Skip to content

Type newlines as Enter (#61) - #299

Merged
hugs merged 2 commits into
mainfrom
fix/61-newline-types-as-enter
Aug 4, 2026
Merged

Type newlines as Enter (#61)#299
hugs merged 2 commits into
mainfrom
fix/61-newline-types-as-enter

Conversation

@hugs

@hugs hugs commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Rebase of @kevinsimler's #61, opened 2026-01-28. The fix is theirs, unchanged; only the surroundings had moved.

A literal newline is not a key. WebDriver addresses Enter through \uE006, so typing "123\n456" sent '\n' as a key value the browser ignored:

type "#multiline" "123\n456"   ->  "123456"     before
                               ->  "123\n456"   after

What changed from their PR

Nothing conceptual. Three pieces of scaffolding had moved underneath it in the eight months it was open:

Their PR Why it no longer applied
internal/proxy/router.go proxy renamed to api in e61a1ed; that loop is now handlers_interaction.go
${CLICKER} in tests binary renamed in 9bc9c17
tests drove seleniumbase.io live external sites stall and wedge the suite

Tests now use the shared local server, which gains a textarea fixture on /inputs. Their two cases are kept as they wrote them: one for a carriage return, one for a newline. Also added element.type() in the JS client, which the CLI tests do not reach.

Verified

Against the unpatched binary, their split turns out to be well chosen:

carriage return  ->  passes    Chrome already treats a raw CR as Enter
newline          ->  fails     the actual bug

So the CR case is a regression guard for behaviour that already worked, and the newline case is the fix. Mapping only '\n' is correct and sufficient.

Full make test passes.

Closes #61

kevinsimler and others added 2 commits August 4, 2026 16:56
A literal newline is not a key. WebDriver addresses Enter through the
normalized key value , so typing "123\n456" sent '\n' as a key value
the browser ignored and the textarea received "123456".

Original patch by Kevin Simler in #61. Rebased: the second call site moved
from internal/proxy/router.go to internal/api/handlers_interaction.go when
proxy was renamed to api (e61a1ed).
The original tests drove https://seleniumbase.io/demo_page. Live external
sites stall and wedge the suite, so they now use the shared test server,
which gains a textarea fixture on /inputs.

Also covers element.type() in the JS client, which the CLI tests do not
reach, and updates CLICKER to VIBIUM after the binary rename (9bc9c17).
@hugs
hugs merged commit 8d0f2a4 into main Aug 4, 2026
1 check passed
@hugs
hugs deleted the fix/61-newline-types-as-enter branch August 4, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants