Skip to content

A window resize cuts short an in-flight animate_layout slide (snap) #80

Closed

Description

@samitbasu

Found by the #76 layer-2 fuzzer. A window-resize frame cuts short a slide already in flight, and the node snaps to its final position.

Minimal repro (todo example): [ClickUp(1), SetWidth(240)]. The row swap starts sliding; the next frame's resize places the row at once, a 44-pt jump instead of a slide.

Cause: LayoutAnimation::begin (src/transition.rs) discards the whole tracking store when the root area changed (the #30 rule "a resize doesn't animate"). That rule is right for starting animations: nodes moved by the resize itself shouldn't slide. Dropping running ones is what causes the snap.

Fix direction: on a resize frame, keep in-flight animations but retarget them. Measure the remaining offset against the node's new relative position, as an interrupted move already does, or finish them over their remaining time. Start no new ones from the resize itself. Keep it one rule in one place.

Tests: the fuzzer's repro as a regression test, plus assert_continuous() over a resize in the middle of a slide, with no allow_jump.

Activity

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions