ui.js: Only set tabindex=-1 on elements which are otherwise not focusable
This commit is contained in:
parent
39fbd3e27e
commit
f1db972cc5
|
@ -172,7 +172,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($element.length) {
|
if ($element.length) {
|
||||||
if (typeof $element.attr('tabindex') === 'undefined') {
|
if (! this.isFocusable($element)) {
|
||||||
$element.attr('tabindex', -1);
|
$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 () {
|
moveToLeft: function () {
|
||||||
var col2 = this.cutContainer($('#col2'));
|
var col2 = this.cutContainer($('#col2'));
|
||||||
var kill = this.cutContainer($('#col1'));
|
var kill = this.cutContainer($('#col1'));
|
||||||
|
|
Loading…
Reference in New Issue