SectorNordAG: Pressing 'Enter' key inside of <input> triggers wrong event in AgentTicketNote. #554
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
On a page with both Save as new draft and Submit buttons, pressing the Enter key inside a element triggers the Save as new draft button by default.
In order to fix this behaviour, the following code could be added to Core.Form.js.
Additionally, the code that handles the user attempting to submit a form from within a <textarea> when Frontend::RichText is disabled could be updated to similarly trigger the expected button by changing the logic of how the button is selected. Currently it selects the first element with the type submit, which it mistakenly believes to be Save as new draft, changing this to last() instead will trigger the expected button.
Type of change
1 - 🐞 bug 🐞
Additional information
Checklist