Skip to content

Commit

Permalink
Merge pull request #1467 from antonio-ortega/alloyeditor_1466
Browse files Browse the repository at this point in the history
fix: Toolbar is not correctly positioned when editing tables and images within a modal window
  • Loading branch information
wincent authored Mar 8, 2021
2 parents ec74b33 + d38889d commit 302fded
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/selections/selection-position.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,16 @@ const centerToolbar = function(toolbar, rect) {
}
}

const scrollTop = uiNode ? uiNode.scrollTop : 0;

const endPosition = [
rect.left + rect.width / 2 - halfNodeWidth - scrollPosition.x,
rect.top +
offsetHeight -
toolbarNode.offsetHeight +
scrollPosition.y -
gutter.top,
gutter.top +
scrollTop,
];

if (endPosition[0] < 0) {
Expand Down

0 comments on commit 302fded

Please sign in to comment.