Skip to content

[BUG]: word caps skips the first word after <br>, and mock text decorations depend on the Chrome version #8120

Open

Description

@camdecoster

Description

textcase: "word caps" doesn't capitalize the first word after a <br> when the line before ends with a letter. All lines share one <text> element, so text-transform: capitalize reads "set<br>two" as the word "settwo".

Screenshots

Image

Steps to reproduce

  • Open Plotly devtools and paste the following into the browser devtools console:
Plotly.newPlot(gd, [{ y: [1, 2] }], {
    font: { textcase: 'word caps' },
    shapes: [{ type: 'line', x0: 0, x1: 1, y0: 1, y1: 2, label: { text: 'not set<br>two lines' } }]
});
  • Note that the second line isn't capitalized

Notes

  • Treemap and icicle slices without text draw a ' ' placeholder with the trace font. With lineposition, Chrome 154 draws a stray underline dash under that space.
  • Chrome 155 skips decorations under spaces at the start or end of a line. Thus geo_africa-insets, text_on_shapes_basic, and treemap_multi-line_headers render differently in Chrome 154 and Chrome 155.
  • GitHub runner images recently started using the newer version of Chrome, but not all of them so we're seeing intermittent CI failures
  • For now, I'm going to pin Chrome. Once the version rolls out across all runners, we'll need to address this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions