Commit f572fa1
fix: Korean/CJK IME composition events not captured
IME composition events (compositionstart, compositionupdate, compositionend)
fire on the focused element. When using a hidden textarea for input,
the textarea receives focus, but composition event listeners were attached
to the container element, causing the events to be missed.
Changes:
- input-handler.ts: Attach composition events to inputElement (textarea)
if available, otherwise fall back to container
- terminal.ts: Focus textarea instead of container in focus() method
- selection-manager.ts: Skip wide character continuation cells when
extracting selection text (fixes spaces between CJK characters)
This fixes Korean, Chinese, Japanese and other IME input methods.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 03ead6e commit f572fa1
3 files changed
Lines changed: 34 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
291 | 296 | | |
292 | | - | |
| 297 | + | |
293 | 298 | | |
294 | 299 | | |
295 | | - | |
| 300 | + | |
296 | 301 | | |
297 | 302 | | |
298 | | - | |
| 303 | + | |
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
| |||
1059 | 1064 | | |
1060 | 1065 | | |
1061 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
1062 | 1069 | | |
1063 | | - | |
| 1070 | + | |
1064 | 1071 | | |
1065 | 1072 | | |
1066 | 1073 | | |
1067 | 1074 | | |
1068 | | - | |
| 1075 | + | |
1069 | 1076 | | |
1070 | 1077 | | |
1071 | 1078 | | |
1072 | 1079 | | |
1073 | | - | |
| 1080 | + | |
1074 | 1081 | | |
1075 | 1082 | | |
1076 | 1083 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
717 | 717 | | |
718 | 718 | | |
719 | 719 | | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
729 | 735 | | |
730 | 736 | | |
731 | 737 | | |
| |||
0 commit comments