jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Tobias Gritschacher: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I4b028c2b3c31517460c961f8ea456217bbee5d62
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to