jenkins-bot has submitted this change and it was merged.
Change subject: Fix siteselector not closing after selecting a site
......................................................................
Fix siteselector not closing after selecting a site
This is a direct follow up to I575f1e6. It introduced a bug: In some
selectors (e.g. the siteselector, where you select the site for a sitelink)
the input field is automatically refocused after a suggested item was
selected. This reopened the selector, causing flickering and confusion.
With this patch the selector is only reopened when you use the mouse, but
not via tab key. I believe this is ok: when you use the keyboard, you can
press "cursor down" to reopen the selector. But it's impossible with the
mouse alone.
Bug: T135008
Change-Id: Iad68c459d56554f47e6c34c377499297e3d37e66
---
M lib/jquery.ui/jquery.ui.suggester.js
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
Adrian Heine: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lib/jquery.ui/jquery.ui.suggester.js
b/lib/jquery.ui/jquery.ui.suggester.js
index 4799055..800e82a 100644
--- a/lib/jquery.ui/jquery.ui.suggester.js
+++ b/lib/jquery.ui/jquery.ui.suggester.js
@@ -304,8 +304,10 @@
suppressKeyPress = false;
this.element
- .on( 'focus.suggester', function( event ) {
- self._updateMenuVisibility();
+ .on( 'click.suggester', function( event ) {
+ if ( !self.isSearching() ) {
+ self._updateMenuVisibility();
+ }
} )
.on( 'keydown.suggester', function( event ) {
var isDisabled = self.element.hasClass(
'ui-state-disabled' );
--
To view, visit https://gerrit.wikimedia.org/r/296886
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iad68c459d56554f47e6c34c377499297e3d37e66
Gerrit-PatchSet: 1
Gerrit-Project: data-values/value-view
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Adrian Heine <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits