-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComboBox does not add new items with TAB if user types fast enough #4276
Comments
Originally by jarno.rantala Attachment added: |
Originally by jarno.rantala It seems that the problem is that the VFilterSelect does nothing when tab is pressed while it still waits for filtering response. One solution could be modifying the last if-check in doSelectedItemAction()-method. |
Originally by @denis-anisimov doSelectedItemAction() method is called as a result of onBlur() method invocation when TAB is pressed. Depending on the typing speed suggestion popup menu could be already opened or not. The latter case is exactly the case of the issue. There is specific "if" branch in the onBlur() method. But this branch as a result doesn't do anything because "waitingForFilteringResponse" field is not changed and still has "true" value. |
Originally by @denis-anisimov Changing "waitingForFilteringResponse" flag to "false" it seems is safe in the mentioned "if" branch because suggestion popup menu is not shown. |
Originally by @Legioth Reviewed by me. |
Originally by @MTzukanov Still can be reproduced in Vaadin 7.1.10. |
Originally by @MTzukanov It seems that it is happening only when the dropdown is open or is about to be closed or something like that. Just a feeling I had during playing for long time with it, if it helps. |
Originally by @jdahlstrom The remaining problem seems to be about the case where the user actually presses tab before releasing the previous key. The filter request is only sent on keyup, so if the focus changes before that, the combobox never receives the keyup event. |
Originally by @jdahlstrom Some of the stuff in |
Originally by antti Review @ https://dev.vaadin.com/review/3564/ |
ComboBox does not select or add a new value (in case allowed) if User enters the value by typing and TABs out fast. This bug was originally reported in #4276 and fixed by https://dev.vaadin.com/review/#/c/3564/6/client/src/com/vaadin/client/ui/VFilterSelect.java. However later some logic of VFilterSelect was refactored by patch acb8893, which accidentally removed the fix. In this new PR I am re-applying the missing part of the logic (adopted to the new structure) Fixes #6671
…12033) ComboBox does not select or add a new value (in case allowed) if User enters the value by typing and TABs out fast. This bug was originally reported in #4276 and fixed by https://dev.vaadin.com/review/#/c/3564/6/client/src/com/vaadin/client/ui/VFilterSelect.java. However later some logic of VFilterSelect was refactored by patch acb8893, which accidentally removed the fix. In this new PR I am re-applying the missing part of the logic (adopted to the new structure) Fixes #6671
Originally by jarno.rantala
If user types very fast a new value to ComboBox and presses tabulator the new value is not added. If user waits a while before pressing tab, the value is added. If ENTER is used then the new value is always added.
There is a test UI as an attachment but the behaviour can also be seen in sampler when 'New Items Allowed' is set on.
Imported from https://dev.vaadin.com/ issue #12325
The text was updated successfully, but these errors were encountered: