Skip to content
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

Closed
vaadin-bot opened this issue Aug 6, 2013 · 11 comments
Closed

ComboBox does not add new items with TAB if user types fast enough #4276

vaadin-bot opened this issue Aug 6, 2013 · 11 comments
Labels
Milestone

Comments

@vaadin-bot
Copy link
Collaborator

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

@vaadin-bot
Copy link
Collaborator Author

Originally by jarno.rantala


Attachment added: MyVaadinUI.java (1.7 KiB)
test UI

@vaadin-bot
Copy link
Collaborator Author

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.

@vaadin-bot
Copy link
Collaborator Author

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.

@vaadin-bot
Copy link
Collaborator Author

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.

@vaadin-bot
Copy link
Collaborator Author

Originally by @Legioth


Reviewed by me.

@vaadin-bot
Copy link
Collaborator Author

Originally by celyo


Could you backport this fix for 6.8.x series please! I thing this will fix issues #12238 and #4283. I'm waiting for solution for a while because these issues brakes my UI.

@vaadin-bot
Copy link
Collaborator Author

Originally by @MTzukanov


Still can be reproduced in Vaadin 7.1.10.

@vaadin-bot
Copy link
Collaborator Author

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.

@vaadin-bot
Copy link
Collaborator Author

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.

@vaadin-bot
Copy link
Collaborator Author

Originally by @jdahlstrom


Some of the stuff in onKeyUp should also be done in onBlur - however, it is not completely obvious which parts. Presumably if we're blurring before the suggestion popup is opened, we should still send the filter request (and later the selection/newitem request) but keep the suggestion menu closed.

@vaadin-bot
Copy link
Collaborator Author

Originally by antti


Review @ https://dev.vaadin.com/review/3564/

@vaadin-bot vaadin-bot added the bug label Dec 10, 2016
@vaadin-bot vaadin-bot added this to the Vaadin 7.2.3 milestone Dec 10, 2016
TatuLund added a commit that referenced this issue Jun 11, 2020
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
TatuLund added a commit that referenced this issue Jun 17, 2020
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant