admin管理员组文章数量:1392076
Unlike other browsers, Safari triggers composition events in a different order. Consider the code below and following scenario:
- Having some input that triggers composition mode (say, some of Chinese input mode) and press "a".
- When the composition input dialog is shown, click some number, say, 4
Events in Chrome and Firefox will happen in following order:
[keydown] key: a; currently in composing mode: false
[compositionstart] data:
[compositionupdate] data:
[keydown] key: 4; currently in composing mode: true
[compositionend] data: 呵
In Safari, however, the keydown that triggers compositionend
will happen later, after the corresponding composition has been triggered, so the order will be:
[compositionstart] data:
[compositionupdate] data:
[keydown] key: a; currently in composing mode: true
[compositionend] data:
本文标签:
版权声明:本文标题:javascript - Safari: Is there's any way to detect that this particular keydown event triggered compositionend? - Stack O 内容由网友自发贡献,该文观点仅代表作者本人,
转载请联系作者并注明出处:http://www.betaflare.com/web/1744780718a2624695.html,
本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论