aboutsummaryrefslogtreecommitdiff
path: root/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
diff options
context:
space:
mode:
authorAnanya Sen2012-03-28 14:02:57 -0700
committerAnanya Sen2012-03-28 14:02:57 -0700
commit834086b91afc752745128a0c2be4730bf1c7858d (patch)
tree1dfff28493c115a52479d6ca52705f8a35ddc313 /js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
parent4c2948447482fe57110e7fd674e362bbbd5814b6 (diff)
downloadninja-834086b91afc752745128a0c2be4730bf1c7858d.tar.gz
detect paste from context menu for new file and save as dialog
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com> Conflicts: js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js')
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js12
1 files changed, 11 insertions, 1 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 fac4c488..5dd1153d 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
@@ -23,11 +23,21 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, {
23 this.fileInputField.selectDirectory = true; 23 this.fileInputField.selectDirectory = true;
24 24
25 this.newFileName.addEventListener("keyup", this, false); 25 this.newFileName.addEventListener("keyup", this, false);
26 this.newFileName.focus(); 26 this.newFileName.addEventListener("paste", this, false);
27 this.newFileName.focus();
27 this.newFileName.select(); 28 this.newFileName.select();
28 } 29 }
29 }, 30 },
30 31
32 handlePaste:{
33 value:function(evt){
34 var self=this;
35 setTimeout(function(){
36 self.handleKeyup(evt);
37 }, 1);
38 }
39 },
40
31 handleKeyup:{ 41 handleKeyup:{
32 value:function(evt){ 42 value:function(evt){
33 if(this.newFileName.value !== "") { 43 if(this.newFileName.value !== "") {