Skip to content

@lynx-js/web-elements@0.12.21

Choose a tag to compare

@github-actions github-actions released this 05 Dec 13:39
e40bcf9

Patch Changes

  • Send a plain JSON object as the detail of the x-text layout event. (#4453)

    The detail used to be a Proxy measuring the text on demand, which cannot be posted to the background thread. Now all the displayed lines are measured before the event is dispatched, and detail is { lineCount, lines: { start, end, ellipsisCount }[] }. The lines exceeding text-maxline or hidden by the truncation are not included. The measurement only happens when the layout event is bound.

    Also fix the wrong line count for texts starting with a multi-line text node and for texts with padding.