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

fix: 表格下方无序有序列表无法删除问题 #5108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/table-module/src/module/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ function withTable<T extends IDomEditor>(editor: T): T {
const before = Editor.before(newEditor, selection) // 前一个 location
if (before) {
const isTableOnBeforeLocation = isTableLocation(newEditor, before) // before 是否是 table
const isTableOnCurSelection = isTableLocation(newEditor, selection) // 当前是否是 table
if (isTableOnBeforeLocation && !isTableOnCurSelection) {
return // 如果当前不是 table ,前面是 table ,则不执行删除。否则会删除 table 最后一个 cell

// 如果前面是 table, 当前是空 p,则不执行删除。否则会删除 table 最后一个 cell
if (isTableOnBeforeLocation && core.DomEditor.isSelectedEmptyParagraph(newEditor)) {
return
}
}
}
Expand Down