From e2dfdf0ef7898085de596047ff923a8de03d6809 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Fri, 5 Apr 2019 13:40:33 +0100 Subject: [PATCH] EditSummaryWidget: Don't show suggestions on focus Bug: T220176 Change-Id: Iffad075929d8835eb4f8677b33c3edd30a27b3f8 --- .../ui/widgets/ve.ui.MWEditSummaryWidget.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWEditSummaryWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWEditSummaryWidget.js index 53a484119b..dbb90e10ae 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWEditSummaryWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWEditSummaryWidget.js @@ -170,3 +170,23 @@ ve.ui.MWEditSummaryWidget.prototype.getLookupMenuOptionsFromData = function ( da } ); } ); }; + +/** + * @inheritdoc + */ +ve.ui.MWEditSummaryWidget.prototype.onLookupInputFocus = function () { + this.lookupInputFocused = true; + // Don't open menu on focus. + // TODO: Make this an option upstream (T169484) +}; + +/** + * @inheritdoc + */ +ve.ui.MWEditSummaryWidget.prototype.onLookupInputMouseDown = function () { + // Always open the menu on mousedown, even if not focused. + if ( !this.lookupMenu.isVisible() ) { + this.populateLookupMenu(); + } + // TODO: Make this an option upstream (T169484) +};