Skip to content

Commit

Permalink
fix: cursor position is on the top margin calculation error #882
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufe921 committed Nov 11, 2024
1 parent 2d43343 commit 992e4ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editor/core/position/Position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ export class Position {
}
// 正文上-循环首行
const margins = this.draw.getMargins()
if (y <= margins[1]) {
if (y <= margins[0]) {
for (let p = 0; p < positionList.length; p++) {
const position = positionList[p]
if (position.pageNo !== positionNo || position.rowNo !== 0) continue
Expand Down

0 comments on commit 992e4ed

Please sign in to comment.