Henning Snater has uploaded a new change for review.
https://gerrit.wikimedia.org/r/51643
Change subject: (bug 45198) Do not hide entity selector's list of suggestion
......................................................................
(bug 45198) Do not hide entity selector's list of suggestion
The change set prevents the entity selector's list of suggestions from hiding
when an exact, unique label is typed into the input box.
Change-Id: I4e573d0578d3e153a842a20b4196fb7ed2b3b0f9
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/43/51643/1
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
index 15cf0ab..d094827 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
@@ -341,6 +341,18 @@
},
/**
+ * @see ui.suggester.close
+ */
+ close: function( event ) {
+ if ( !event || !event.originalEvent ||
event.originalEvent.type !== 'programmatic' ) {
+ // Do not close the list of suggestions when
programmatically selecting an entity
+ // (e.g by typing an exact, unique entity
label), allowing the user to check that
+ // the typed string actually matches a single
entity.
+ $.ui.suggester.prototype.close.apply( this,
event );
+ }
+ },
+
+ /**
* Triggers searching for more results with the current search
term.
*/
more: function() {
--
To view, visit https://gerrit.wikimedia.org/r/51643
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e573d0578d3e153a842a20b4196fb7ed2b3b0f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits