diff --git a/modules/ve-math/ve.ui.MWMathContextItem.js b/modules/ve-math/ve.ui.MWMathContextItem.js index a247672..a5f8d67 100644 --- a/modules/ve-math/ve.ui.MWMathContextItem.js +++ b/modules/ve-math/ve.ui.MWMathContextItem.js @@ -23,7 +23,10 @@ ve.ui.MWMathContextItem = function VeUiMWMathContextItem() { flags: [ 'progressive' ] } ); - this.actionButtons.addItems( [ this.quickEditButton ], 0 ); + // Don't show quick edit button in mobile as the primary action will be quick edit + if ( !this.context.isMobile() ) { + this.actionButtons.addItems( [ this.quickEditButton ], 0 ); + } this.quickEditButton.connect( this, { click: 'onInlineEditButtonClick' } ); @@ -58,6 +61,15 @@ ve.ui.MWMathContextItem.prototype.onInlineEditButtonClick = function () { this.context.getSurface().executeCommand( 'mathInspector' ); }; +/** + * @inheritdoc + */ +ve.ui.MWMathContextItem.prototype.getCommand = function () { + return this.context.getSurface().commandRegistry.lookup( + this.context.isMobile() ? 'mathInspector' : this.constructor.static.commandName + ); +}; + /* Registration */ ve.ui.contextItemFactory.register( ve.ui.MWMathContextItem );