mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-11 16:36:13 -06:00
The floating comment card (new note, text box, edit comment) was an egui Area constrained to the whole window. When the page scrolled its comment under the mode bar, the card was pushed back into the window and sat over the mode bar and toolbar until the whole page left the screen. It now shows only while its anchor is inside the document view, and is kept inside that view. While the comment is out of sight the draft is kept, and the editor takes the focus again when it comes back. Test: tests/comments.rs the_composer_hides_while_its_comment_is_scrolled_away scrolls a sticky note's anchor above the document with its page still on screen; it fails without the change (the card sat at y=43, over the toolbar, with the document starting at y=134) and passes with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>