Skip to content

Correct browser text input and wheel direction - #194

Open
relh wants to merge 2 commits into
treeform:masterfrom
relh:relh/browser-rune-input-20260909
Open

Correct browser text input and wheel direction#194
relh wants to merge 2 commits into
treeform:masterfrom
relh:relh/browser-rune-input-20260909

Conversation

@relh

@relh relh commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

The Emscripten backend cancels printable keydown events while relying on the resulting keypress for onRune. Chrome then suppresses that event: Backspace works in a canvas text field, but typing a replacement name inserts nothing. Allow the printable default only when rune input is enabled and Ctrl/Meta are absent; the existing keypress handler still delivers and consumes the rune.

The browser wheel handler also used opposite signs for Mac and non-Mac hosts. Normalize both to the existing Mac direction while preserving their magnitude multipliers. This lets a downward wheel gesture scroll a Silky panel down on Linux-hosted Chrome.

The same real key-event flow fails at name entry on unmodified Windy (baseline) and passes name entry with this fix (browser run). That second run continued through dropdowns, theme selection and reward gating, then exposed the wheel-direction bug fixed here. Both fixes then passed the complete native/WebGL UI gallery workflow, including real key presses, slider drags beyond both bounds, dropdowns, disabled reward actions, resizing and downward scrolling. The consumer pins this PR at d38903c295fdbb74e46bda70c3d6b892195d95c3.

The final commit passed Linux, macOS and Windows CI. IME composition, clipboard input and native wheel conventions are outside this change.

@relh relh changed the title Restore printable rune input in the Emscripten backend Correct browser text input and wheel direction Sep 9, 2026
@relh
relh marked this pull request as ready for review September 9, 2026 04:20
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.

1 participant