Skip to content

Commit 302fded

Browse files
authored
Merge pull request #1467 from antonio-ortega/alloyeditor_1466
fix: Toolbar is not correctly positioned when editing tables and images within a modal window
2 parents ec74b33 + d38889d commit 302fded

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)