oeyoews / tiddlywiki-codemirror6

Your Next TiddlyWiki5 Editor: Codemirror6
https://tiddlywiki-codemirror6.vercel.app/#%24%3A%2Fplugins%2Foeyoews%2Ftiddlywiki-codemirror-6
MIT License
15 stars 0 forks source link

[BUG] / 菜单没有 preventDefault #144

Closed linonetwo closed 1 day ago

linonetwo commented 1 day ago

Describe the bug

在监听了回车和tab 的地方,例如大纲里 https://tiddly-gittly.github.io/streams-outliner-lib/ ,tab 没有被拦截

Expected behavior

if(!event.defaultPrevented) {

可以看到已经 preventDefault https://github.com/tiddly-gittly/streams-outliner-lib/blob/main/src/streams-outliner-lib/widgets/keyboard-plus.js#L49

To Reproduce

  1. Go to https://tiddly-gittly.github.io/streams-outliner-lib/
  2. 在大纲里用 / 菜单
  3. tab 或回车
  4. 触发了大纲的行为

Screenshots

No response

Configuration

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

No response

linonetwo commented 1 day ago

不对,这里是大纲先拿到,然后设置了 event.preventDefault。不设置就好了