We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bc2df3a + 6b1913a commit fe386b8Copy full SHA for fe386b8
src/ui/react/src/selections/selection-position.js
@@ -59,8 +59,15 @@
59
payload.editorEvent.data.selectionData : null;
60
61
if (selectionData && selectionData.element) {
62
- centerToolbar(this, selectionData.element.getClientRect());
+ var nativeEditor = payload.editor.get('nativeEditor');
63
+ var uiNode = nativeEditor.config.uiNode;
64
65
+ var scrollTop = uiNode ? uiNode.scrollTop : 0;
66
+
67
+ var rect = selectionData.element.getClientRect();
68
+ rect.top += scrollTop;
69
70
+ centerToolbar(this, rect);
71
return true;
72
}
73
};
@@ -92,4 +99,4 @@
92
99
image: imageSelectionSetPosition,
93
100
table: tableSelectionSetPosition
94
101
95
-}());
102
+}());
0 commit comments