File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ export function FileManagerDialogs(browser) {
7171 self . startedPromise = null ;
7272 self . dirBrowser = { } ; // multiple file operations are ui blocking
7373
74+ self . bindKeys = ( diagId ) => {
75+ $ ( "#" + diagId ) . keydown ( function ( e ) {
76+ ( e . keyCode === 13 ) && self . startButton ( diagId ) . click ( ) ;
77+ } ) ;
78+ } ;
7479
7580 self . setDialogConfig = ( diagId , config ) => {
7681 self . forms [ diagId ] = config ;
@@ -95,7 +100,7 @@ export function FileManagerDialogs(browser) {
95100
96101 self . afterShow = ( diagId ) => {
97102 setTimeout ( function ( ) {
98- self . startButton ( diagId ) . select ( ) . focus ( ) ;
103+ $ ( "#" + diagId ) . select ( ) . focus ( ) ;
99104 } ) ;
100105 }
101106 // common dialog cleanup
@@ -248,6 +253,8 @@ export function FileManagerDialogs(browser) {
248253 self . getDialogHeader ( diagId )
249254 . prepend ( '<icon class="flm-sprite-diag flm-sprite sprite-' + what + '"></icon>' ) ;
250255
256+ self . bindKeys ( diagId ) ;
257+
251258 // $("#"+diagId).find('.flm-diag-cancel')
252259 // .click(function () {
253260 // console.log("cancel triggered");
You can’t perform that action at this time.
0 commit comments