Panic on web when using google input tools extension
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
**Describe the bug**
Typing in textedit widget while having the google input tools enabled in wasm triggers a panic in wasm.
**To Reproduce**
Steps to reproduce the behavior:
1. Use Chromium and install the [Google Input Tools extension](https://chromewebstore.google.com/detail/google-input-tools/mclkkofklkfljcocdinagocijmpgbhab)
2. Go to https://egui.rs/
3. Enable a Chinese input method (I used _Shuangpin (Microsoft)_, but I think this applies to any CJK input methods)
4. Try entering something with the input tool enabled. The app would crash
**Expected behavior**
App should not crash
**Screenshots**
**Desktop (please complete the following information):**
- OS: Debian 6.12.73-1 (2026-02-17) x86_64 GNU/Linux
- Browser: Version 145.0.7632.159 (Official Build) built on Debian GNU/Linux 13 (trixie) (64-bit)
- On X11
**Additional context**
the code is defined at https://github.com/wasm-bindgen/wasm-bindgen/blob/6b6aa1ca4732bfd8f2910745e32ba959c094c2ad/crates/cli-support/src/js/mod.rs#L1849
related issues: https://github.com/wasm-bindgen/wasm-bindgen/issues/2746
Console output:
```
egui_demo_app.js:3184 using deprecated parameters for the initialization function; pass a single object instead
__wbg_init @ egui_demo_app.js:3184
(anonymous) @ (index):129
chext_driver.js:539 Initialized driver at: Mon Mar 09 2026 12:54:19 GMT-0700 (Pacific Daylight Time)
chext_loader.js:73 Initialized chextloader at: 1773086059185
egui_demo_app.js:1393 [eframe::web::web_runner] eframe/src/web/web_runner.rs:93: event handlers installed.
egui_demo_app.js:116 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at passStringToWasm0 (egui_demo_app.js:116:23)
at imports.wbg.__wbg_key_7b5c6cb539be8e13 (egui_demo_app.js:1576:26)
at 029d0efe:0x7468e3
at 029d0efe:0x4877b5
at 029d0efe:0x6d79d8
at 029d0efe:0x757c5b
at 029d0efe:0x75eaaa
at __wbg_adapter_36 (egui_demo_app.js:250:14)
at HTMLInputElement.real (egui_demo_app.js:170:24)
passStringToWasm0 @ egui_demo_app.js:116
imports.wbg.__wbg_key_7b5c6cb539be8e13 @ egui_demo_app.js:1576
$func6786 @ 029d0efe:0x7468e3
$func2219 @ 029d0efe:0x4877b5
$func4953 @ 029d0efe:0x6d79d8
$func7412 @ 029d0efe:0x757c5b
$closure1243_externref_shim @ 029d0efe:0x75eaaa
__wbg_adapter_36 @ egui_demo_app.js:250
real @ egui_demo_app.js:170
```
Contributor guide
Research direction
Reproduce the crash in the egui.rs web demo with Chromium, Google Input Tools, and a Chinese input method, then inspect the generated JavaScript stack and crates/cli-support/src/js/mod.rs around line 1849. Compare the failing key event path with the related wasm-bindgen issue. Done means text entry no longer panics and the reported console error is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100