Skip to content

Commit d38889d

Browse files
fix: correct toolbar position in tables and images when editor is rendered in a modal window
Fixes: https://issues.liferay.com/browse/LPS-128401 Related discussion: https://issues.liferay.com/browse/PTR-2282 Closes: #1466
1 parent 567e1f7 commit d38889d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/selections/selection-position.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,16 @@ const centerToolbar = function(toolbar, rect) {
6161
}
6262
}
6363

64+
const scrollTop = uiNode ? uiNode.scrollTop : 0;
65+
6466
const endPosition = [
6567
rect.left + rect.width / 2 - halfNodeWidth - scrollPosition.x,
6668
rect.top +
6769
offsetHeight -
6870
toolbarNode.offsetHeight +
6971
scrollPosition.y -
70-
gutter.top,
72+
gutter.top +
73+
scrollTop,
7174
];
7275

7376
if (endPosition[0] < 0) {

0 commit comments

Comments
 (0)