Souk21 / TW-commandpalette

A command palette for TiddlyWiki. Demo: https://souk21.github.io/TW-commandpalette/
Other
40 stars 5 forks source link

Bug: IME's "Enter" trigger the "open tiddler" #9

Closed linonetwo closed 2 years ago

linonetwo commented 4 years ago

If the user is using an input method for example Chinese IME or Japanese IME, typing "Enter" normally means commit what is being compsed, but in commandpalette it will trigger an action.

Can you wait until IME submit, then allow listener of "Enter" to work?

  document.addEventListener('compositionstart', () => {
    isTypingUsingIME = true;
  });
  document.addEventListener('compositionend', () => {
    isTypingUsingIME = false;
  });
Souk21 commented 2 years ago

Thanks for the report That should be bixed in 0.0.7, let me know :)

linonetwo commented 2 years ago

Glad to see you! Since it has been 2 years, I have already made a fork and made it typescript https://github.com/tiddly-gittly/tiddlywiki-plugins/blob/master/src/commandpalette/src/CommandPaletteWidget.ts