From 8ddc0c016af9ccbda487e460a60202d864524c7a Mon Sep 17 00:00:00 2001 From: Chrissi2812 Date: Thu, 7 Mar 2019 18:15:45 +0100 Subject: [PATCH] add note why we had to use our own cordsAtPos implementation --- packages/tiptap/src/Plugins/MenuBubble.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/tiptap/src/Plugins/MenuBubble.js b/packages/tiptap/src/Plugins/MenuBubble.js index 2c80c4f4..e003d37d 100644 --- a/packages/tiptap/src/Plugins/MenuBubble.js +++ b/packages/tiptap/src/Plugins/MenuBubble.js @@ -81,6 +81,8 @@ class Menu { const { from, to } = state.selection // These are in screen coordinates + // We can't use EditorView.cordsAtPos here because it can't handle linebreaks correctly + // See: https://github.com/ProseMirror/prosemirror-view/pull/47 const start = coordsAtPos(view, from) const end = coordsAtPos(view, to, true)