MDL-68344 filepicker: File Picker focus lost on upload

This commit is contained in:
Thong Bui
2020-09-08 08:45:09 +02:00
committed by Sara Arjona
parent 0e9c755896
commit 2301f9bfaa
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -493,6 +493,7 @@ M.form_filemanager.init = function(Y, options) {
// XXX: magic here, to let filepicker use filemanager scope
options.magicscope = this;
options.savepath = this.currentpath;
options.previousActiveElement = e.target.ancestor('a', true);
M.core_filepicker.show(Y, options);
},
+3 -1
View File
@@ -1422,7 +1422,9 @@ M.core_filepicker.init = function(Y, options) {
width : width+'px',
responsiveWidth : 768,
height : '558px',
zIndex : this.options.zIndex
zIndex : this.options.zIndex,
focusOnPreviousTargetAfterHide: true,
focusAfterHide: this.options.previousActiveElement
});
// create panel for selecting a file (initially hidden)