Skip to content

Commit

Permalink
fix: locate catalog when the context is within the table
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeessang authored Dec 9, 2024
1 parent c599d56 commit 012dc7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/editor/core/command/CommandAdapt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,7 @@ export class CommandAdapt {
}

public locationCatalog(titleId: string) {
const elementList = this.draw.getMainElementList()
const elementList = this.draw.getOriginalMainElementList()
let newIndex = -1
for (let e = 0; e < elementList.length; e++) {
const element = elementList[e]
Expand All @@ -1929,6 +1929,9 @@ export class CommandAdapt {
}
}
if (!~newIndex) return
this.position.setPositionContext({
isTable: false
})
this.range.setRange(newIndex, newIndex)
this.draw.render({
curIndex: newIndex,
Expand Down

0 comments on commit 012dc7d

Please sign in to comment.