294 | // Given a position in the document model, get a bounding box of the
295 | // character at that position, relative to the window.
296 | export function coordsAtPos(view, pos, side) {
297 | let {node, offset} = view.docView.domFromPos(pos, side < 0 ? -1 : 1)
298 |
299 | let supportEmptyRange = browser.webkit || browser.gecko
300 | if (node.nodeType == 3) {
To Reproduce Steps to reproduce the behavior:
See error:
domFromPos src/viewdesc.js:283
280 | let end = offset + child.size 281 | if (!child.domAtom && (side < 0 && !child.border ? end >= pos : end > pos) && 282 | (end > pos || i + 1 >= this.children.length || !this.children[i + 1].beforePosition))
coordsAtPos src/domcoords.js:297
294 | // Given a position in the document model, get a bounding box of the 295 | // character at that position, relative to the window. 296 | export function coordsAtPos(view, pos, side) {
coordsAtPos$1 src/index.js:286
283 | 284 | // Reset variableStore 285 | variableStore.dom = {};
usePosition src/components/FloatingToolbar.tsx:59
56 | const { view, active } = props; 57 | const { selection } = view.state; 58 | const { width: menuWidth, height: menuHeight } = useComponentSize(menuRef);
Version <= 11.8.0