diff --git a/src/css/layout/bounds.ts b/src/css/layout/bounds.ts index 43d1bea..2f1c150 100644 --- a/src/css/layout/bounds.ts +++ b/src/css/layout/bounds.ts @@ -17,7 +17,7 @@ export class Bounds { } static fromDOMRectList(context: Context, domRectList: DOMRectList): Bounds { - const domRect = domRectList[0]; + const domRect = Array.from(domRectList).find(rect => rect.width !== 0); return domRect ? new Bounds( domRect.x + context.windowBounds.left,