mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-24 00:06:49 +00:00
Remove use of jquery.tabIndex in jquery.wikiEditor.dialogs.js
This was used for setting incremental tabindex attributes on the <button> elements of the "Find and replace" dialog as opened from the "Advanced" toolbar section. I was unable to find a difference in behaviour with and without this code running. Both with and without this, when tabbing from the first input field in the dialog, the buttons are in the tab order after the input fields (matching the visual rendering). Unclear what this was doing. Bug: T234581 Change-Id: I5de97733091d0e123913f272b00784205d69267f
This commit is contained in:
parent
c36ba4893e
commit
81b08daa48
|
@ -260,7 +260,6 @@
|
|||
"jquery.cookie",
|
||||
"jquery.throttle-debounce",
|
||||
"jquery.suggestions",
|
||||
"jquery.tabIndex",
|
||||
"jquery.textSelection",
|
||||
"jquery.ui.button",
|
||||
"jquery.ui.dialog",
|
||||
|
|
|
@ -122,9 +122,6 @@
|
|||
.appendTo( $( 'body' ) )
|
||||
.each( module.init )
|
||||
.dialog( configuration );
|
||||
// Set tabindexes on buttons added by .dialog()
|
||||
dialogsModule.fn.setTabindexes( $dialogDiv.closest( '.ui-dialog' )
|
||||
.find( 'button' ).not( '[tabindex]' ) );
|
||||
if ( !( 'resizeme' in module ) || module.resizeme ) {
|
||||
$dialogDiv
|
||||
.on( 'dialogopen', dialogsModule.fn.resize )
|
||||
|
@ -180,19 +177,6 @@
|
|||
$oldHidden.each( function () {
|
||||
$( this ).attr( 'style', $( this ).data( 'oldstyle' ) );
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Set the right tabindexes on elements in a dialog
|
||||
*
|
||||
* @param {Object} $elements Elements to set tabindexes on. If they already have tabindexes, this function can behave a bit weird
|
||||
*/
|
||||
setTabindexes: function ( $elements ) {
|
||||
// Get the highest tab index
|
||||
var tabIndex = $( document ).lastTabIndex() + 1;
|
||||
$elements.each( function () {
|
||||
$( this ).attr( 'tabindex', tabIndex++ );
|
||||
} );
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue