Repository navigation
[stable5.4] fix(submit): only submit the form by button or Ctrl/Cmd+Enter - #3979
Merged
Merged
Conversation
Shift+Enter in a short answer submitted the form by accident (#1048). The questions only caught a plain Enter, so Enter with any modifier fell through to the browser's implicit form submission, which Chromium and Firefox also apply to radio buttons, checkboxes and inputs without their own handler, such as the "Other" answer and grid cells. Ctrl+Enter, the deliberate shortcut, worked only in a long text answer. The form now handles Enter once for all its inputs. Ctrl+Enter or Cmd+Enter submits from any input or text area. Enter with any other modifier in a single-line input moves on to the next field instead of submitting, also past the field set of a choice question, where focus used to stay put. Text areas keep their new line, file inputs open the file picker, buttons keep their default. The submit button announces the shortcut with aria-keyshortcuts. The per-question Enter handlers became dead and are removed. Enter that confirms an IME candidate is left to the input method. Some browsers, such as Safari and older Chromium, fire that keydown with isComposing false but keyCode 229, so both are checked. Fixes #1048 Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Chartman123
approved these changes
Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport of PR #3951