Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编辑页面输入 # 号并输入检索内容后,选中的标签无法生效 #76

Open
LIlGG opened this issue Feb 1, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@LIlGG
Copy link
Member

LIlGG commented Feb 1, 2024

问题描述

  1. 在编辑页面输入 # 号并输入检索内容,检索到两条以上数据时。

  2. 选中非首条数据,按下回车键。
    image

  3. 标签会将当前输入的检索内容变为标签,而不是选中的内容。
    image

此问题应该与 https://github.com/ueberdosis/tiptap/blob/1c5c087641162dc9d82814aaa84fcdc267469545/packages/core/src/InputRule.ts#L233C7-L233C20 有关。

当按下回车时,检索的内容符合输入规则,因此 tiptap 会将其转换为 Tag,并且不会再继续执行其他的 handleKeyDown 事件了。

/kind bug

@f2c-ci-robot f2c-ci-robot bot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 1, 2024
@ruibaby
Copy link
Member

ruibaby commented May 7, 2024

这个问题已经在 #75 中修复。

/close

@LIlGG
Copy link
Member Author

LIlGG commented May 7, 2024

这个问题已经在 #75 中修复。

这个问题与 #75 并不是同一个问题。 #75 的问题是,输入内容并回车会导致其变为标题。

而此 issue 是搜索到多条数据时,无法选择旧标签而是会创建当前键入的内容。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants