Repository navigation
Fix: the highlight menu closed on a scroll the reader did not make - #27
Merged
Merged
Conversation
…er did not make The menu closed on any scroll event. A click that first scrolls the highlight into view, or the page settling while it loads, sends its scroll event just after the menu opened, so the menu closed at once. It now closes when the reader scrolls with the wheel or by touch, or presses outside it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
Clicking a highlight opens a small menu (Ask, Create post, colours, Delete). The menu closed on any
scrollevent outside it. A scroll event that the reader did not cause can arrive just after the menu opens: a click that first scrolls its target into view, or the page settling while it loads. The menu then closed at once.It showed up as a browser test that failed now and then ("a new post for … opens on its frame": the Create post item was detached while it was being clicked), most recently on #26. A reader would see it as a menu that flashes and disappears.
The fix
The menu closes when the reader scrolls the page away from it: with the wheel, by touch, or by dragging a scrollbar (a press outside the menu, as before). A scroll event alone no longer closes it. Resizing the window and Escape still do.
Validation
Not checked: a real touch screen, and trackpad momentum scrolling.
🤖 Generated with Claude Code