Repository navigation
fix: clicking submit after tabbing out of the form submits again (6.4.x) - #288
Closed
RensTillmann wants to merge 1 commit into
Closed
RensTillmann wants to merge 1 commit into
RensTillmann wants to merge 1 commit into
Conversation
Owner
Author
|
The fix is already released in 6.4.010 (release PR #299, merged 21 Oct 2026): src/assets/js/frontend/elements.js lines 1479-1483 clear the last Tab key on mousedown/touchstart, the same code as this PR. This PR's test file tests/test-tab-then-click-client.cjs was not part of that release and stays on this branch. The browser suite covers this on 6.4.010 (tab-then-click.spec.ts, 2 tests passed). |
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.
Summary
Old bug, found by the release gate and reproduced on released 6.4.009 with a plain submit button: fill a field, press Tab until focus leaves the form, then click the submit button: nothing is submitted.
Cause: after a Tab,
SUPER.lastTabKeystaystabuntil the next keydown. A mouse press on the button first focuses the FORM element; thefocusinhandler treats that as tabbing into the form, focuses the first field and the page scrolls, so the mouseup lands elsewhere and the click is lost.Fix: a capturing
mousedown/touchstartlistener resetsSUPER.lastTabKeybefore focus moves, so a pointer press is never treated as Tab-in. Keyboard Tab and Shift+Tab navigation is unchanged (lastTabKey is still set by the keydown handler).Base branch
release/6.4.x: bug fix.Tests
Browser regression (
tab-then-click.spec.tsin the local runner): tab completely outside a form taller than the viewport, then click Send. Released 6.4.009: no submission request within 30 seconds; cand3: passes all 3 repetitions, exactly one request and one saved entry. Shift+Tab navigation passes on both builds.Final cand3 gate
20261020-164106-06bd8f: gate 10/10, security 15/15, full 37 passed / 5 mapped skips, CVE pass. These are local--zipcandidate results, not formal release acceptance.Merge
Draft: for QA and the next release session.