Differency normal characters and half characters on keydown

前端 未结 2 738
挽巷
挽巷 2021-01-15 03:53

We forked experimental Mediawiki VisualEditor. This WYSIWYM editor work with a hidden textarea and a representation of the content in DOM. When you focus the view, the focus

2条回答
  •  死守一世寂寞
    2021-01-15 04:14

    Just found a workaround. By listening to keyup event, dead keys returns a keyIdentifier property set to Unidentified.

    So :

    keyuphandler = function(e)
    {
        if (e.keyIdentifier === 'Unidentified')
        {
            return;
        }
        doSomething();
    }
    

提交回复
热议问题