You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2024/11/19 09:15:30 UTC

(wicket) branch master updated: Fix tab glitch when tabing from and to an autocomplete field, which resulted in a dropdown that didn't open on first character when returning to the field (#1039)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new 8c129abb56 Fix tab glitch when tabing from and to an autocomplete field, which resulted in a dropdown that didn't open on first character when returning to the field (#1039)
8c129abb56 is described below

commit 8c129abb56d157e2d956b64902a1fe3cc974c898
Author: Erik Strid <st...@gmail.com>
AuthorDate: Tue Nov 19 10:14:17 2024 +0100

    Fix tab glitch when tabing from and to an autocomplete field, which resulted in a dropdown that didn't open on first character when returning to the field (#1039)
    
    Co-authored-by: Erik Strid <er...@idainfront.se>
    (cherry picked from commit e7d049b6df62e51e979beaa2982253c3d3f07daa)
---
 .../extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
index 70415e395e..be20fc1652 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
@@ -102,7 +102,11 @@
 				//workaround for IE. Clicks on scrollbar trigger
 				//'blur' event on input field. (See https://issues.apache.org/jira/browse/WICKET-5882)
 				if (menuId !== document.activeElement.id && (menuId + "-container") !== document.activeElement.id) {
-					hideAutoCompleteTimer = window.setTimeout(hideAutoComplete, 500);
+					hideAutoCompleteTimer = window.setTimeout(function() {
+							hideAutoComplete();
+							isTriggeredChange = false;
+							triggerChangeOnHide = false;
+					}, 500);
 				} else {
 					jQuery(this).trigger("focus");
 				}