Henning Snater has uploaded a new change for review.
https://gerrit.wikimedia.org/r/89160
Change subject: $.ui.suggester: Implemented autocompletestring for static
result set
......................................................................
$.ui.suggester: Implemented autocompletestring for static result set
Change-Id: I4b028c2b3c31517460c961f8ea456217bbee5d62
---
M ValueView/resources/jquery.ui/jquery.ui.suggester.js
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues
refs/changes/60/89160/1
diff --git a/ValueView/resources/jquery.ui/jquery.ui.suggester.js
b/ValueView/resources/jquery.ui/jquery.ui.suggester.js
index d6b2bff..3d6d43e 100644
--- a/ValueView/resources/jquery.ui/jquery.ui.suggester.js
+++ b/ValueView/resources/jquery.ui/jquery.ui.suggester.js
@@ -231,6 +231,10 @@
}
response( resultSet );
+
+ if( this._lastKeyDown !== $.ui.keyCode.BACKSPACE ) {
+ this.element.autocompletestring( request.term,
resultSet[0] );
+ }
},
/**
@@ -284,7 +288,7 @@
// auto-complete input box text (because of the
API call lag, this is
// avoided when hitting backspace, since the
value would be reset too slow)
- if ( this._lastKeyDown !== 8 &&
response[1].length > 0 ) {
+ if ( this._lastKeyDown !==
$.ui.keyCode.BACKSPACE && response[1].length > 0 ) {
var incomplete = response[0],
complete = response[1][0];
--
To view, visit https://gerrit.wikimedia.org/r/89160
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b028c2b3c31517460c961f8ea456217bbee5d62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits