diff options
author | Ananya Sen | 2012-03-22 11:46:04 -0700 |
---|---|---|
committer | Ananya Sen | 2012-03-22 11:46:04 -0700 |
commit | 87cf1d7d899bb60581d5e5c6c7ba678620c7148e (patch) | |
tree | a4f2c7cca7268f0ed98ba5e6b42871feea73ded4 /js/io/ui | |
parent | 94bc7b61951677b04213ce18b0ec3e72da5aa8cd (diff) | |
download | ninja-87cf1d7d899bb60581d5e5c6c7ba678620c7148e.tar.gz |
IKNINJA-1302 : close on ESC even if text field is focussed
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io/ui')
-rw-r--r-- | js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js | 4 | ||||
-rw-r--r-- | js/io/ui/save-as-dialog.reel/save-as-dialog.js | 4 |
2 files changed, 8 insertions, 0 deletions
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 d5b59ab8..ecee7c1d 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 | |||
@@ -313,6 +313,8 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C | |||
313 | value:function(evt){ | 313 | value:function(evt){ |
314 | if((evt.keyCode === 13) && !this.okButton.hasAttribute("disabled")){ | 314 | if((evt.keyCode === 13) && !this.okButton.hasAttribute("disabled")){ |
315 | this.handleOkButtonAction(evt); | 315 | this.handleOkButtonAction(evt); |
316 | }else if(evt.keyCode === 27){ | ||
317 | this.handleCancelButtonAction(evt); | ||
316 | } | 318 | } |
317 | else if(!!evt._event.newFileDirectory){ | 319 | else if(!!evt._event.newFileDirectory){ |
318 | this.newFileDirectory = evt._event.newFileDirectory; | 320 | this.newFileDirectory = evt._event.newFileDirectory; |
@@ -327,6 +329,8 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C | |||
327 | value:function(evt){ | 329 | value:function(evt){ |
328 | if((evt.keyCode === 13) && !this.okButton.hasAttribute("disabled")){ | 330 | if((evt.keyCode === 13) && !this.okButton.hasAttribute("disabled")){ |
329 | this.handleOkButtonAction(evt); | 331 | this.handleOkButtonAction(evt); |
332 | }else if(evt.keyCode === 27){ | ||
333 | this.handleCancelButtonAction(evt); | ||
330 | } | 334 | } |
331 | else if(!!evt._event.newFileName){ | 335 | else if(!!evt._event.newFileName){ |
332 | this.newFileName = evt._event.newFileName; | 336 | this.newFileName = evt._event.newFileName; |
diff --git a/js/io/ui/save-as-dialog.reel/save-as-dialog.js b/js/io/ui/save-as-dialog.reel/save-as-dialog.js index 1910f30d..dfaac1aa 100644 --- a/js/io/ui/save-as-dialog.reel/save-as-dialog.js +++ b/js/io/ui/save-as-dialog.reel/save-as-dialog.js | |||
@@ -71,6 +71,8 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, { | |||
71 | value:function(evt){ | 71 | value:function(evt){ |
72 | if((evt.keyCode === 13) && !this.okButton.hasAttribute("disabled")){ | 72 | if((evt.keyCode === 13) && !this.okButton.hasAttribute("disabled")){ |
73 | this.handleOkButtonAction(evt); | 73 | this.handleOkButtonAction(evt); |
74 | }else if(evt.keyCode === 27){ | ||
75 | this.handleCancelButtonAction(evt); | ||
74 | } | 76 | } |
75 | else if(!!evt._event.newFileDirectory){ | 77 | else if(!!evt._event.newFileDirectory){ |
76 | this.folderUri = evt._event.newFileDirectory; | 78 | this.folderUri = evt._event.newFileDirectory; |
@@ -93,6 +95,8 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, { | |||
93 | if(!this.okButton.hasAttribute("disabled")){ | 95 | if(!this.okButton.hasAttribute("disabled")){ |
94 | this.handleOkButtonAction(evt); | 96 | this.handleOkButtonAction(evt); |
95 | } | 97 | } |
98 | }else if(evt.keyCode === 27){ | ||
99 | this.handleCancelButtonAction(evt); | ||
96 | } | 100 | } |
97 | } | 101 | } |
98 | }, | 102 | }, |