[ 
https://issues.apache.org/jira/browse/WICKET-7133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17900027#comment-17900027
 ] 

ASF GitHub Bot commented on WICKET-7133:
----------------------------------------

martin-g commented on code in PR #1041:
URL: https://github.com/apache/wicket/pull/1041#discussion_r1851961245


##########
wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js:
##########
@@ -183,6 +184,12 @@
 
                                                        hideAutoComplete();
 
+                                                       if 
(cfg.focusInputOnTabSelection && keyCode === KEY_TAB) {

Review Comment:
   If you like my idea of using an enum, then here the code would look like:
   ```suggestion
                                                        if 
(cfg.focusInputOnTabSelection == "some_enum_value" && keyCode === KEY_TAB) {
   ```



##########
wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js:
##########
@@ -183,6 +184,12 @@
 
                                                        hideAutoComplete();
 
+                                                       if 
(cfg.focusInputOnTabSelection && keyCode === KEY_TAB) {

Review Comment:
   If you like my idea of using an enum, then here the code would look like:
   ```suggestion
                                                        if 
(cfg.focusInputOnTabSelection === "some_enum_value" && keyCode === KEY_TAB) {
   ```





> Ability move focus back to the autocomplete field when selecting an item 
> using the Tab key
> ------------------------------------------------------------------------------------------
>
>                 Key: WICKET-7133
>                 URL: https://issues.apache.org/jira/browse/WICKET-7133
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>            Reporter: Erik Strid
>            Priority: Major
>         Attachments: myproject-tab-focus.zip
>
>
> We need the ability to prevent the autocomplete from moving the focus to the 
> next component when the user press "Tab". The marked item should be selected 
> but the focus should go back to the autocomplete input field.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to