Skip to content

Commit

Permalink
fix(mvc.Dom): use getComputedStyle for static position check (#2864)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKanera authored Jan 28, 2025
1 parent f3f9c14 commit 1eff27a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/joint-core/src/mvc/Dom/methods.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ export function position() {
doc = el.ownerDocument;
offsetParent = el.offsetParent || doc.documentElement;
const isStaticallyPositioned = (el) => {
const { position } = el.style;
return !position || position === 'static';
const { position } = getComputedStyle(el);
return position === 'static';
};
while (offsetParent && offsetParent !== doc.documentElement && isStaticallyPositioned(offsetParent)) {
offsetParent = offsetParent.offsetParent || doc.documentElement;
Expand Down

0 comments on commit 1eff27a

Please sign in to comment.