mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-20 20:03:42 +00:00
17 lines
480 B
JavaScript
17 lines
480 B
JavaScript
|
function ModeTabSelectWidget() {
|
||
|
// Parent constructor
|
||
|
ModeTabSelectWidget.super.apply( this, arguments );
|
||
|
}
|
||
|
|
||
|
OO.inheritClass( ModeTabSelectWidget, OO.ui.TabSelectWidget );
|
||
|
|
||
|
ModeTabSelectWidget.prototype.onDocumentKeyDown = function ( e ) {
|
||
|
// Handle Space like Enter
|
||
|
if ( e.keyCode === OO.ui.Keys.SPACE ) {
|
||
|
e = $.Event( e, { keyCode: OO.ui.Keys.ENTER } );
|
||
|
}
|
||
|
ModeTabSelectWidget.super.prototype.onDocumentKeyDown.call( this, e );
|
||
|
};
|
||
|
|
||
|
module.exports = ModeTabSelectWidget;
|