Skip to content

Commit e587a82

Browse files
authored
fix: Properties x and y of BoundingRect is undefined in old browser (niklasvh#2797)
1 parent 67c5e8d commit e587a82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/css/layout/bounds.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export class Bounds {
2020
const domRect = Array.from(domRectList).find((rect) => rect.width !== 0);
2121
return domRect
2222
? new Bounds(
23-
domRect.x + context.windowBounds.left,
24-
domRect.y + context.windowBounds.top,
23+
domRect.left + context.windowBounds.left,
24+
domRect.top + context.windowBounds.top,
2525
domRect.width,
2626
domRect.height
2727
)

0 commit comments

Comments
 (0)