Correctly select the visible and not readonly input/select
issue6897 review41651002
This commit is contained in:
1 parent
5e3b18aaa9
commit
05edf756fb
2 files changed
+3
-3
No files matched your search
+2
-1
@@ -532,7 +532,8 @@ var Sao = {};
|
||||
var currently_focused = jQuery(document.activeElement);
|
||||
var has_focus = currently_focused.closest(this.el) > 0;
|
||||
if (!has_focus) {
|
||||
jQuery(this).find(':input:visible:first').focus();
|
||||
jQuery(this).find(':input:visible:not([readonly]):first')
|
||||
.focus();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
+1
-2
@@ -130,7 +130,7 @@
|
||||
var dialog = Sao.Session.login_dialog();
|
||||
|
||||
var empty_field = function() {
|
||||
return dialog.modal.find('input,select').filter(':visible')
|
||||
return dialog.modal.find('input,select').filter(':visible:not([readonly])')
|
||||
.filter(function() {
|
||||
return !jQuery(this).val();
|
||||
});
|
||||
@@ -188,7 +188,6 @@
|
||||
el.prop('readonly', databases.length == 1);
|
||||
el.show();
|
||||
el.val(database || '');
|
||||
empty_field().first().focus();
|
||||
});
|
||||
return dfd.promise();
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user