Skip to content

Commit 0476d06

Browse files
authored
fix: ios text wrapping with 0 width rect (#2786)
1 parent 74696fa commit 0476d06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/css/layout/bounds.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class Bounds {
1717
}
1818

1919
static fromDOMRectList(context: Context, domRectList: DOMRectList): Bounds {
20-
const domRect = domRectList[0];
20+
const domRect = Array.from(domRectList).find(rect => rect.width !== 0);
2121
return domRect
2222
? new Bounds(
2323
domRect.x + context.windowBounds.left,

0 commit comments

Comments
 (0)