@qnroa/qtype 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -13,6 +13,31 @@ can land in any minor bump (`0.x.0`).
13
13
 
14
14
  ## [Unreleased]
15
15
 
16
+ ## [0.1.2] — 2026-08-28
17
+
18
+ Fixes iOS Safari (and some Android IMEs) where soft-keyboard keys
19
+ (Space, Enter, Backspace) silently did nothing. The engine received
20
+ no event because these browsers don't fire `keydown` for keys
21
+ committed outside an active composition — they only arrive via
22
+ `beforeinput`, which the old handler `preventDefault`'d without
23
+ dispatching.
24
+
25
+ ### Fixed
26
+ - **Space key works on iPhone / iPad Chinese keyboards.** SPACE and
27
+ any printable char arriving as `beforeinput insertText` outside of
28
+ an active composition is now dispatched to the engine. Previously
29
+ the key felt "dead" — users had to swap to the English keyboard
30
+ just to type a space between words.
31
+ - **Enter / Return key works on iPhone / iPad.** `insertLineBreak`
32
+ and `insertParagraph` from `beforeinput` now dispatch as `enter`.
33
+ - **Backspace works on iPhone / iPad.** `deleteContentBackward`,
34
+ `deleteWordBackward`, and `deleteSoftLineBackward` from
35
+ `beforeinput` now dispatch as `backspace`.
36
+ - **De-duplication for browsers that fire both events.** Desktop
37
+ browsers fire `keydown` AND a follow-up `beforeinput` for the same
38
+ keystroke. A 50ms guard prevents a double-emit across all three
39
+ paths (char, enter, backspace).
40
+
16
41
  ## [0.1.1] — 2026-08-28
17
42
 
18
43
  Fixes typing comparison for equivalent-but-different characters that
package/CHANGELOG.zh.md CHANGED
@@ -12,6 +12,25 @@ English: [CHANGELOG.md](https://www.npmjs.com/package/@qnroa/qtype?activeTab=cod
12
12
 
13
13
  ## [Unreleased]
14
14
 
15
+ ## [0.1.2] — 2026-08-28
16
+
17
+ 修复 iOS Safari(以及部分 Android 输入法)上软键盘的 Space / Enter /
18
+ Backspace 键"没反应"的问题。这些键在 composition 结束外按下时
19
+ **不触发** `keydown`,只通过 `beforeinput` 到达;旧代码只
20
+ `preventDefault` 没派发给引擎,用户以为键坏了。
21
+
22
+ ### 修复
23
+ - **iPhone / iPad 上空格键可用**。软键盘 `insertText` 现在会派发
24
+ 给引擎。之前必须切到英文键盘才能在单词间打空格。
25
+ - **iPhone / iPad 上 Enter/Return 可用**。`insertLineBreak` /
26
+ `insertParagraph` 现在派发为 `enter`。
27
+ - **iPhone / iPad 上 Backspace 可用**。`deleteContentBackward` /
28
+ `deleteWordBackward` / `deleteSoftLineBackward` 现在派发为
29
+ `backspace`。
30
+ - **桌面浏览器双触发去重**。桌面 `keydown` + `beforeinput` 同一次按
31
+ 键会双触发,加了 50ms 时间戳去重,char/enter/backspace 三条路径
32
+ 都覆盖。
33
+
15
34
  ## [0.1.1] — 2026-08-28
16
35
 
17
36
  修复输入法/终端产出的等价字符(中文输入法下的全角空格、macOS/iOS