-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Using debounce, does not support submit on enter #8289
Comments
not sure I understand the issue, can you send a plunker example? |
after a bit of fighting i got it down to a simple example: http://plnkr.co/edit/5oP0AhmC7BiFbdzLiaDg if you type fast and pres enter nothing will happen. Expected is that an enter disables the debounce and directly evaluates the input so that it can submit the current behavior is not really user friendly and does not allow integration with something like a barcode scanner |
Okay. There are two things that needs to be fixed in this plunker so it will work properly:
Anyway, here's a plunker with the described fixes: http://plnkr.co/edit/c8uJRRzI9Zy2MFjWhOm2?p=preview |
Thnx for the workAround, The not working disable is a bit of a problem, but might be good enough for now. I understand that there is a PR that would fix this problem. However I disagree with the fact that it is a PR, which on itself is a workAround. It should be seen as unwanted side-effect of the debounce option, which should be fixed/removed instead of adding an new option |
So you are saying that |
/cc @petebacondarwin |
As described by the docs, and clarified by @shahata, this appears to be working as expected. If I change form to include |
In a simple form with one field and one button I added a debounce:
ng-model-options="{debounce: {default: 500, blur: 0}}"
I can understand that debounce might break form submit on Enter.
However this is valid usage pattern which should atleast be optional to turn off the blur for an event or something like that.
I expected that the setting blur to 0, would help, but this is not the case
The text was updated successfully, but these errors were encountered: