fix: ios text wrapping with 0 width rect (#2786)

This commit is contained in:
Niklas von Hertzen
2022-01-01 13:07:52 +08:00
committed by GitHub
parent 74696faf47
commit 0476d06515

View File

@@ -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,