-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
fix: Backspace does not work properly behind list #5102
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5102 +/- ##
=========================================
Coverage 55.91% 55.91%
Complexity 3032 3032
=========================================
Files 524 524
Lines 17826 17826
Branches 1329 1329
=========================================
Hits 9968 9968
Misses 7309 7309
Partials 549 549 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi, @AirboZH ,感谢提交的 PR。
经过测试,我发现此提交会对其他快捷键产生冲突。例如:
输入:
1. 123
2. 123
之后,按 Mod + a
进行全选,然后按删除键进行删除,此时只会删除 list item 的最后一个 item。
这应该是删除键与快捷键冲突导致,删除键遇到 item 的 li 标签后,将其还原为了普通文本就停止继续操作了。
🤨确实是我自测的时候没测到这个问题。 这是一个已知的问题,并且也有其他 tiptap下游软件受到影响。 我们可以等待上游处理。 同时,我也在看看有没有机会在 |
tiptap 在写这个扩展的时候,将工具类 list-keymap 也导出了,那么只需要在 Halo 中重构扩展逻辑即可。 可以提供一种思路,例如在 |
# Conflicts: # console/pnpm-lock.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
nice,它可以正常工作,很完美。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LIlGG, ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/milestone 2.12.x |
…list (#92) #### What type of PR is this? /kind bug #### What this PR does / why we need it: 增加 keymap 扩展,用于解决列表组件无法使用退格键删除的问题。 See halo-dev/halo#5102 #### How to test it? 测试列表能否使用退格键删除 #### Which issue(s) this PR fixes: Fixes #91 #### Does this PR introduce a user-facing change? ```release-note 修复瞬间编辑区域列表组件无法被删除的问题 ```
What type of PR is this?
/kind bug
What this PR does / why we need it:
增加
@tiptap/extension-list-keymap
扩展,优化列表的键盘操作Which issue(s) this PR fixes:
Fixes #5065
Special notes for your reviewer:
测试方法:
Delete
和退格键backspace
的支持是否符合预期Delete
和退格键backspace
的支持是否符合预期Delete
和退格键backspace
的支持是否符合预期Ctrl-A
全选后对于删除键Delete
和退格键backspace
的支持是否符合预期Does this PR introduce a user-facing change?