Skip to content

Keep WASM IME visible when the canvas loses focus#113

Closed
yuchanns wants to merge 1 commit into
cloudwu:masterfrom
yuchanns:fix/wasm-ime-canvas-unfocus
Closed

Keep WASM IME visible when the canvas loses focus#113
yuchanns wants to merge 1 commit into
cloudwu:masterfrom
yuchanns:fix/wasm-ime-canvas-unfocus

Conversation

@yuchanns

Copy link
Copy Markdown
Contributor

Summary

  • keep the active WASM IME textarea visible when browser focus moves away from the canvas
  • leave real window blur/focus lifecycle handling to the existing JavaScript listeners

Root cause

Focusing the IME textarea causes Sokol to emit SAPP_EVENTTYPE_UNFOCUSED for the canvas. Treating that canvas event as a window blur immediately hides the textarea, so a mobile first-touch keyboard request is lost until a later resize or focus event reapplies the IME rectangle.

Validation

  • ./bin/luamake-bin/bin/osx_arm64/luamake -compiler emcc
  • mobile Playwright touch sequence confirms textarea focus occurs inside the original touch event with transient user activation
  • IME composition, touch selection, scrolling, and native macOS smoke checks pass in the Miru integration

@yuchanns

yuchanns commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

忽视这个 pr 。无语了,试用 gpt5.6 很快噌的一下就乱提 pr 了

@yuchanns yuchanns closed this Jul 12, 2026
@yuchanns yuchanns deleted the fix/wasm-ime-canvas-unfocus branch July 12, 2026 08:04
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