Skip to content

Commit 43c556c

Browse files
committed
fix
1 parent f226d85 commit 43c556c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/khaki-peaches-lick.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@udecode/plate-cursor': patch
3+
---
4+
5+
Fix overlay position when there a fixed height of editor.

packages/cursor/src/hooks/useCursorOverlayPositions.ts

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const useCursorOverlayPositions = <TCursorData extends UnknownObject>({
4747
const contentRect = containerRef.current!.getBoundingClientRect();
4848
xOffset = contentRect.x;
4949
yOffset = contentRect.y;
50+
yOffset -= containerRef.current.scrollTop;
5051
}
5152

5253
let selectionRectsChanged =

0 commit comments

Comments
 (0)