Skip to content

Commit 75a63c0

Browse files
committed
Return DOM positions at the right side of point widgets
1 parent 72d07e4 commit 75a63c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export class LineTile extends CompositeTile {
339339
let {tile, offset} = found
340340
if (this.dom.contains(tile.dom)) {
341341
if (tile.isText()) return new DOMPos(tile.dom, Math.min(tile.dom.nodeValue!.length, offset))
342-
return tile.domPosFor(offset, side)
342+
return tile.domPosFor(offset, tile.flags & TileFlag.Before ? 1 : tile.flags & TileFlag.After ? -1 : side)
343343
}
344344
let parent = found.tile.parent!, saw = false, last: Tile | undefined
345345
for (let ch of parent.children) {

0 commit comments

Comments
 (0)