-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Escape and enter should not propagate outside of ui-select #808
Comments
@drewfreyling 85cbd70 was i mistake (isn't it obvious?), hence 6b0fd79 |
@mareczek That makes a bit more sense now! My apologies. |
@drewfreyling no problem, do you have any knowledge if this can be merged / or when it could be merged? |
Tagging @dimirc for that info... |
Got the same problem too. |
+1 Pretty big issue if you ask me... |
Yeah. Doesn't this bug make it impossible to include in a form with an |
👍 |
@zigzackattack yeah, it does. An |
Pull request to solve it: #901 |
Thanks @mareczek |
#901 certainly does correct one issue, but it introduces a new one. A control should only consume an event when it actually does something with it. So if pressing enter causes an item to be selected, it should stop propagation, same if pressing escape closes the dropdown. But if the user hasn't typed anything and enter/escape isn't closing the dropdown or selecting an item, it should be allowed to propagate and submit or close the modal. Now you can't ever submit a form if focus is within this control. I can try to get a new pull request put together that would do this. |
I do agree with @MikeMatusz, enter/escape should trigger default behavior when drop down list is closed. Because it should be possible to submit a FORM that contains ui-select by pressing ENTER, |
@MikeMatusz I made a pull request, #1279, to allow submit when pressing ENTER key in ui-select element by adding in-form="true". If you appreciate it, can you vote for it ? |
At present when ui-select is focused escape and enter propagate outside of ui-select.
When escape is pressed while the list of options is opened and the ui-select is displayed in modal the modal closes
or
when enter is pressed while one of the options is highlighted the form is being submitted.
The text was updated successfully, but these errors were encountered: