ui.js: Only set tabindex=-1 on elements which are otherwise not focusable

This commit is contained in:
Johannes Meyer 2019-07-22 13:41:52 +02:00
parent 39fbd3e27e
commit f1db972cc5
1 changed files with 7 additions and 1 deletions

View File

@ -172,7 +172,7 @@
}
if ($element.length) {
if (typeof $element.attr('tabindex') === 'undefined') {
if (! this.isFocusable($element)) {
$element.attr('tabindex', -1);
}
@ -185,6 +185,12 @@
}
},
isFocusable: function ($element) {
return $element.is('*[tabindex], a[href], input:not([disabled]), button:not([disabled])' +
', select:not([disabled]), textarea:not([disabled]), iframe, area[href], object' +
', embed, *[contenteditable]');
},
moveToLeft: function () {
var col2 = this.cutContainer($('#col2'));
var kill = this.cutContainer($('#col1'));