Commit d2d6d1a
feat(web-ui): Android beforeinput fallback for the capture input
Some Android soft keyboards report key="Unidentified" on keydown and only
deliver the real text via beforeinput, so the mobile keyboard toggle's
capture input now also handles beforeinput:
- insertText -> each char sent as a key (folds in armed sticky modifiers)
- insertLineBreak/insertParagraph -> Enter
- deleteContentBackward/Forward -> Backspace/Delete
iOS/desktop fire a usable keydown (which cancels its default and normally
suppresses beforeinput); a short timestamp guard skips beforeinput when a
keydown was just handled, so those platforms never double-insert.
Verified headless: a synthetic beforeinput insertText reaches the editor,
deleteContentBackward maps to Backspace, and a real keydown still inserts
exactly once. Desktop suite 50/50; zero JS errors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkVw18h2cpkouakSub7HuK1 parent b0f27a4 commit d2d6d1a
1 file changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
1474 | | - | |
| 1474 | + | |
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
1478 | 1478 | | |
1479 | 1479 | | |
1480 | 1480 | | |
1481 | 1481 | | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
1482 | 1497 | | |
1483 | 1498 | | |
1484 | 1499 | | |
| |||
1631 | 1646 | | |
1632 | 1647 | | |
1633 | 1648 | | |
1634 | | - | |
1635 | | - | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
1636 | 1652 | | |
1637 | 1653 | | |
1638 | 1654 | | |
| |||
0 commit comments