-
Notifications
You must be signed in to change notification settings - Fork 298
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
AutoCompleteTextFields submits Form if a choice is selected via enter-key #533
Comments
AFAIK ObjectAutoComplete uses a copy of Wicket-Extensions wicket-autocomplete.js and this file has not been kept up-to-date with the fixes upstream. |
Of course, I'm trying to find the difference in behavior and finding no hope someone can give me an idea. Until commented that implements it with AutoCompleteTextField and does not give the error described by pressing the enter key. But my controls are with ObjectAutoCompleteField. |
By the time, a partial solution was found to definitely fix it through your help. The issue is to know how to prevent the event from spreading to submit. //Autocomplete //AjaxButton |
Copy from WICKET-4857
"I am not quite sure if this is really a bug, but the behaivor of wicket 1.5 and wicket 6 differs in the following situation:
In wicket 1.5 a user could select a choice in an AutoCompleteTextField via the enter-key and the underlying Form was not submitted.
In wicket 6 however the Form gets submitted in that case.
Note: the behaivor is in both versions identical (aka no form submit) if no button is added to the form. Thus in both versions the Form is not submitted if the user selects a choice via mouse-click.
While in some use cases it is useful that hitting the enter-key in TextFields submits the form - e.g. in a search panel, in this particular use case the form should not be submitted. Or at least, there should be a (built in) hook to prevent this behaivor."
I REALIZE migration version 1.4 to 6. In version 1.4 there were no problems.
I currently work with version 6.24 with ObjectAutoCompleteField control and have the error described at the top. I tried in the examples of wicketstuff 7 ObjectAutoComplete exactly Examples - Example Validation and the problem persists.
Any idea to solve described.
The text was updated successfully, but these errors were encountered: