diff options
author | Ananya Sen | 2012-03-30 16:31:18 -0700 |
---|---|---|
committer | Ananya Sen | 2012-03-30 16:31:18 -0700 |
commit | d4a682ddca0248e0dd7d8871dddbd167bd020a18 (patch) | |
tree | 673455ed0df96f8174a195c700b3e534bceed5d9 /js/io/ui/new-file-dialog | |
parent | 834086b91afc752745128a0c2be4730bf1c7858d (diff) | |
download | ninja-d4a682ddca0248e0dd7d8871dddbd167bd020a18.tar.gz |
- using clipboard data directly to avoid using setTimeout
- fixed logical error to trigger OK on Enter key pressed
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io/ui/new-file-dialog')
-rwxr-xr-x | js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js | 7 | ||||
-rw-r--r-- | js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js index 5dd1153d..02579676 100755 --- a/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js +++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js | |||
@@ -31,10 +31,9 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { | |||
31 | 31 | ||
32 | handlePaste:{ | 32 | handlePaste:{ |
33 | value:function(evt){ | 33 | value:function(evt){ |
34 | var self=this; | 34 | evt.preventDefault(); |
35 | setTimeout(function(){ | 35 | evt.target.value = evt.clipboardData.getData("Text"); |
36 | self.handleKeyup(evt); | 36 | this.handleKeyup(evt); |
37 | }, 1); | ||
38 | } | 37 | } |
39 | }, | 38 | }, |
40 | 39 | ||
diff --git a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js index 18556bc5..c98955ca 100644 --- a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js +++ b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js | |||
@@ -326,8 +326,8 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C | |||
326 | 326 | ||
327 | handleNewFileDirectorySet:{ | 327 | handleNewFileDirectorySet:{ |
328 | value:function(evt){ | 328 | value:function(evt){ |
329 | if((evt.keyCode === 13) && !this.okButton.hasAttribute("disabled")){ | 329 | if(evt.keyCode === 13){ |
330 | this.handleOkButtonAction(evt); | 330 | if(!this.okButton.hasAttribute("disabled")) this.handleOkButtonAction(evt); |
331 | }else if(evt.keyCode === 27){ | 331 | }else if(evt.keyCode === 27){ |
332 | this.handleCancelButtonAction(evt); | 332 | this.handleCancelButtonAction(evt); |
333 | } | 333 | } |