Skip to content

Commit 1eff27a

Browse files
authored
fix(mvc.Dom): use getComputedStyle for static position check (#2864)
1 parent f3f9c14 commit 1eff27a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/joint-core/src/mvc/Dom/methods.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ export function position() {
337337
doc = el.ownerDocument;
338338
offsetParent = el.offsetParent || doc.documentElement;
339339
const isStaticallyPositioned = (el) => {
340-
const { position } = el.style;
341-
return !position || position === 'static';
340+
const { position } = getComputedStyle(el);
341+
return position === 'static';
342342
};
343343
while (offsetParent && offsetParent !== doc.documentElement && isStaticallyPositioned(offsetParent)) {
344344
offsetParent = offsetParent.offsetParent || doc.documentElement;

0 commit comments

Comments
 (0)