docs: warn that press_key/fill_input double-inserts characters on newer Chrome#419
Open
blaircullen wants to merge 1 commit into
Open
docs: warn that press_key/fill_input double-inserts characters on newer Chrome#419blaircullen wants to merge 1 commit into
blaircullen wants to merge 1 commit into
Conversation
…er Chrome press_key dispatches keyDown WITH a `text` field AND a separate `char` event. On newer Chrome (confirmed HeadlessChrome 149) the keyDown(text) already inserts the character, so the char event duplicates it — typing "abc" yields "aabbcc" (e.g. m3media -> mm33mmeeddiiaa), which often surfaces as a bogus "invalid username/password" on login forms. Documents the symptom, root cause, a native-value-setter workaround for controlled inputs, and the real fix (drop `text` from the keyDown, or use rawKeyDown+char) in the field-tested gotchas. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Skill review passedReviewed 1 file(s) — no findings. |
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.
What
Adds a field-tested gotcha to
SKILL.md:press_key(and thereforefill_input, which calls it per character) double-inserts every character on newer Chrome.Repro
Confirmed on HeadlessChrome 149.0.0.0. Real-world symptom: a login filled via
fill_inputsentmm33mmeeddiiaaform3mediaand the site returned "Invalid username or password" — looked like a credential problem, was actually doubled input.Root cause
press_keydispatcheskeyDownwith atextfield and a separatecharevent:On newer Chrome the
keyDowncarryingtextalready inserts the character, so the explicitcharevent inserts it a second time. (On older buildskeyDown(text)apparently didn't auto-insert, so the pair produced a single insert — hence it worked before.)This PR
Documentation only — adds the symptom, root cause, and a native-value-setter workaround for controlled inputs.
Suggested real fix (not in this PR)
Make
press_keyinsert exactly once on all Chrome versions — either droptextfrom thekeyDownand let thecharevent do the insert, or sendrawKeyDown+char. Happy to follow up with the code change + a regression test if you'd prefer it in the same PR.🤖 Generated with Claude Code