Safari browser in the Chinese input method environment, the keydown event will be executed after the content changes?

Safari browser in the Chinese input method environment, the keydown event will be executed after the content changes, so I disable the default thing, that is, I cannot disable special character input?

Jul.24,2021

under different browsers and input methods, the processing time and trigger ability of keydown and keypress are different.

  • key* event test:
    keydown:

    Chrome:
    1, Chinese input method all keys trigger, English input method all keys trigger;

    Safari:
    1. All keys of the Chinese input method are triggered, and all keys of the English input method are triggered before the content changes enter the event callback.

    keypress:

    Chrome:
    1. Chinese input method function key triggers, English input method all keys trigger;

    Safari:
    1. All keys of Chinese input method are not triggered, while all keys of English input method are triggered.

Menu