diff options
Diffstat (limited to 'js/io/ui/new-file-dialog/new-file-location.reel')
-rwxr-xr-x | js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js | 12 |
1 files changed, 12 insertions, 0 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 0e1e09a4..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 | |||
@@ -23,6 +23,17 @@ 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.addEventListener("paste", this, false); | ||
27 | this.newFileName.focus(); | ||
28 | this.newFileName.select(); | ||
29 | } | ||
30 | }, | ||
31 | |||
32 | handlePaste:{ | ||
33 | value:function(evt){ | ||
34 | evt.preventDefault(); | ||
35 | evt.target.value = evt.clipboardData.getData("Text"); | ||
36 | this.handleKeyup(evt); | ||
26 | } | 37 | } |
27 | }, | 38 | }, |
28 | 39 | ||
@@ -32,6 +43,7 @@ var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { | |||
32 | var newFileNameSetEvent = document.createEvent("Events"); | 43 | var newFileNameSetEvent = document.createEvent("Events"); |
33 | newFileNameSetEvent.initEvent("newFileNameSet", false, false); | 44 | newFileNameSetEvent.initEvent("newFileNameSet", false, false); |
34 | newFileNameSetEvent.newFileName = this.newFileName.value; | 45 | newFileNameSetEvent.newFileName = this.newFileName.value; |
46 | newFileNameSetEvent.keyCode = evt.keyCode; | ||
35 | this.eventManager.dispatchEvent(newFileNameSetEvent); | 47 | this.eventManager.dispatchEvent(newFileNameSetEvent); |
36 | } | 48 | } |
37 | } | 49 | } |