Repository navigation
Conversation
On a coarse pointer the follow-up composer submits on `pointerup` and then swaps the primary action from Submit to the microphone in the same commit. The browser's trailing compatibility `click` is hit-tested after that swap, so it lands on the replacement microphone button, whose handler had no guard and started a recording. A single tap therefore sent the message and opened the microphone. Only activate voice from a click whose gesture began on that same control: record the button on `pointerdown` and ignore pointer-driven clicks (`detail > 0`) whose `currentTarget` does not match. Keyboard activation (`detail === 0`) is unaffected, and voice still starts inside the synchronous user gesture that `getUserMedia` requires. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
ymichael
force-pushed
the
bb/investigate-mobile-submit-starting-voice-recordi-thr_kac4gk3kqg
branch
from
September 10, 2026 17:02
6cacbe8 to
26f4f8f
Compare
ymichael
deleted the
bb/investigate-mobile-submit-starting-voice-recordi-thr_kac4gk3kqg
branch
September 10, 2026 17:07
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.
Human comments
What was wrong
On coarse-pointer devices, follow-up submission happens on pointer-up. Sending clears the composer immediately, replacing the Submit button with the microphone button before the browser dispatches the tap compatibility click. That trailing click is hit-tested against the replacement microphone control and starts recording even though the gesture began on Submit.
What changed
Voice activation now records the exact microphone button that received pointer-down and ignores pointer-driven clicks retargeted to a different replacement button. Deliberate microphone taps, mouse clicks, and keyboard or assistive activation remain supported, and touch submission still keeps its pointer-up latency improvement.
How you verified