diff options
author | julieng <julien.gattelier@gmail.com> | 2021-08-04 18:32:17 +0200 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2021-08-05 23:24:20 +0800 |
commit | 9b2427e4648e3cc9002c87274aeb8360a391fa0f (patch) | |
tree | 980160decd45c7706ace94bad41cf2f03764d8f5 /files/zh-cn/web/api/element/keydown_event | |
parent | 2aa3dd6b1d2336993ae870976b9067e155e602dd (diff) | |
download | translated-content-9b2427e4648e3cc9002c87274aeb8360a391fa0f.tar.gz translated-content-9b2427e4648e3cc9002c87274aeb8360a391fa0f.tar.bz2 translated-content-9b2427e4648e3cc9002c87274aeb8360a391fa0f.zip |
Fixes #1634 - remove old compat site for zh-CN and zh-TW
Diffstat (limited to 'files/zh-cn/web/api/element/keydown_event')
-rw-r--r-- | files/zh-cn/web/api/element/keydown_event/index.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/files/zh-cn/web/api/element/keydown_event/index.html b/files/zh-cn/web/api/element/keydown_event/index.html index 2576b577f2..56777100fb 100644 --- a/files/zh-cn/web/api/element/keydown_event/index.html +++ b/files/zh-cn/web/api/element/keydown_event/index.html @@ -38,7 +38,7 @@ translation_of: Web/API/Element/keydown_event <p>键盘事件只能由 <code><inputs></code>, <code><textarea></code> 以及任何具有 <code>contentEditable</code> 或 <code>tabindex="-1"</code>属性的组件触发。</p> -<p>自 Firefox 65起, <code>keydown</code> 与 <code><a href="/en-US/docs/Web/API/Element/keyup_event">keyup</a></code> 事件会在IME(输入法编辑器)复合事件中被触发,目的是为了提升CJKT(中日韩台地区)用户跨浏览器性能, ({{bug(354358)}},更多详情访问 <a href="https://www.fxsitecompat.com/en-CA/docs/2018/keydown-and-keyup-events-are-now-fired-during-ime-composition/">keydown and keyup events are now fired during IME composition</a> ). 若要忽略复合事件中所有 <code>keydown</code> 事件, 可以按照如下代码修改 (229是某个在IME中触发的键盘事件对应的 <code>keyCode</code>):</p> +<p>自 Firefox 65起, <code>keydown</code> 与 <code><a href="/en-US/docs/Web/API/Element/keyup_event">keyup</a></code> 事件会在IME(输入法编辑器)复合事件中被触发,目的是为了提升CJKT(中日韩台地区)用户跨浏览器性能, ({{bug(354358)}}). 若要忽略复合事件中所有 <code>keydown</code> 事件, 可以按照如下代码修改 (229是某个在IME中触发的键盘事件对应的 <code>keyCode</code>):</p> <pre class="brush: js">eventTarget.addEventListener("keydown", event => { if (event.isComposing || event.keyCode === 229) { |