Skip to content

Commit

Permalink
fix: ios text wrapping with 0 width rect (#2786)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh authored Jan 1, 2022
1 parent 74696fa commit 0476d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/css/layout/bounds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0476d06

Please sign in to comment.