Repository navigation
fix: carry the comment box's frame through a saved-state handoff without the scroll lag - #6735
Conversation
…6725) This reverts commit 9fb8bd4. `floatingPlacement.lag()` read the comment box's rectangle against its anchor's box read now, and `fabFrameAt` subtracted the difference. When saved state moves the anchor under an open box, as an edit to the quoted words does, that difference is the anchor's own move rather than a stale rectangle after a scroll, so the handoff in `placeFab` adopted a frame offset by it and the box jumped (247 px in test_saved_widget_words_cannot_dismiss_an_unfinished_comment). The send-in-a-scrolling- task placement #6725 fixed returns; #6591 tracks it. Refs #6734
|
@leaf-agent This revert prevents the saved-state handoff jump, but it also restores the same-task scroll-and-Send placement defect and removes its regression test. Please preserve that test and both behaviors. The handoff in
|
…d's as painted Restores #6725's scroll compensation and its regression test, which the previous commit reverted, and keeps the handoff fix that revert bought. `fabFrameAt`, which Send reads through the exported `frame`, still subtracts `floatingPlacement.lag()`, so a comment sent in the task that scrolled the page opens its card where the box paints (test_a_send_in_the_task_that_scrolls_the_page_opens_the_card_where_the_box_stood). The handoff in `placeFab`, where saved state moves the box's attachment from quoted words to their subject, adopts the frame as its rectangles read: `lag` measures from the anchor's box read now, which that saved state has just moved, so it counted the move as a scroll and the open box jumped (test_saved_widget_words_cannot_dismiss_an_unfinished_comment). Refs #6734
|
Done in On the head, |
Keeps #6725's scroll compensation for Send, and stops the open comment box from jumping when saved state moves what it's attached to. That jump turned
test_saved_widget_words_cannot_dismiss_an_unfinished_commentred on main for three of its cases (widget,revision,dragged-revision) in run 44999105534.#6725 added
floatingPlacement.lag(), the comment box's client rectangle minus where its last placement stands it, measured from the anchor's box read now.fabFrameAtsubtracts it so a Send in the task that scrolled the page opens its card where the box paints.fabFrameAthas a second caller, though: the handoff inplaceFab, which adopts the seated editor's frame when saved state moves the box's attachment from quoted words to their subject. There the anchor moved because its content changed, not because of a scroll, solag()counted that move as lag and the box jumped (247 px in thewidgetcase) while the user was writing.The change (net against
main, one file): the frame computation now takes the lag to subtract.fabFrameAt, which Send reads through the exportedframe, still passeslag(). The handoff inplaceFabpasses zero and adopts the frame as its rectangles read, as it did before #6725. Both of #6725's behaviors and its regression test stay.Verification on the head
cf813f0fa:test_saved_widget_words_cannot_dismiss_an_unfinished_comment(all six cases) andtest_a_send_in_the_task_that_scrolls_the_page_opens_the_card_where_the_box_stoodpass: 7 passed.fabFrameAtalso passing zero, the Send test fails with the card 120 px off, which is the injected scroll. So the test still guards the Send path.pnpm run check:browserpasses.Closes #6591. The previous commit on this branch reopened it while the branch reverted #6725; with #6725 kept, its second failure mode stays fixed.
Refs #6734