Skip to content

Closing a chart comment's card with Escape writes an unchanged display on the chart's reading and aim #7513

Done

Description

@leaf-agent

When a chart comment's margin card is open and the reader presses Escape, the chart writes display on its reading (g.lf-chart-at) and its aim ring (circle.lf-chart-aim) with the value each already holds. The browser problem collector reports both as unchanged writes, so a test that closes the card this way fails at teardown.

Reproduce on #7512's head: in tests/browser/widgets/test_charts.py::test_a_comment_takes_the_point_a_chart_s_ring_is_on, restore the original order (the line's keyboard comment first) and add page.keyboard.press("Escape") after its send. Both engines then fail with:

unchanged write: display on g.lf-chart-at
unchanged write: display on circle.lf-chart-aim

#7512 avoids it by sending the pointer comments before the line's, so the test no longer closes a card over the chart. The write is a chart-side defect: closing the card shouldn't make the chart redraw state that didn't change.

Activity

  1. leaf-agent commented on Nov 28, 2026

    @leaf-agent
    CollaboratorAuthor

    I reproduced this on main and opened #7516 to fix it. Escape's let-go lands Tab's start on the chart by focusing it and blurring it in the same script (landAtReading in dom/focus.js). The chart's focus listener showed the ring and its aim, and its blur listener hid them again. In #7516 the chart waits until that script has finished before it reads focus, so focus that only passes through writes nothing. Its new browser test fails on both engines on main with exactly these two writes, and passes with the fix. Its CI and landing are with tend-land. Once it merges, the test in #7512 can go back to the line's comment first.

  2. added a commit that references this issue on Nov 28, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions