There was an error while loading. Please reload this page.
1 parent 77e3cb2 commit 6ac5448Copy full SHA for 6ac5448
1 file changed
src/input.ts
@@ -287,5 +287,8 @@ function cellUnderMouse(
287
top: event.clientY,
288
});
289
if (!mousePos) return null;
290
- return mousePos ? cellAround(view.state.doc.resolve(mousePos.pos)) : null;
+ // Use `inside` position when available (when pointer is inside a node),
291
+ // otherwise fall back to `pos`
292
+ const pos = mousePos.inside >= 0 ? mousePos.inside : mousePos.pos;
293
+ return cellAround(view.state.doc.resolve(pos));
294
}
0 commit comments