We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de7cb2a commit 063c770Copy full SHA for 063c770
scripts/JSRootPainter.js
@@ -1444,8 +1444,8 @@
1444
// our position inside canvas, but to set 'absolute' position we should use
1445
// canvas element offset relative to first parent with position
1446
var offx = 0, offy = 0;
1447
- while ((prnt !== null) && !offx && !offy) {
1448
- if (prnt.style.top || prnt.style.left) break;
+ while (prnt && !offx && !offy) {
+ if (getComputedStyle(prnt).position !== 'static') break;
1449
offx += prnt.offsetLeft;
1450
offy += prnt.offsetTop;
1451
prnt = prnt.parentNode;
0 commit comments