Skip to content

Fix: the highlight menu closed on a scroll the reader did not make - #27

Merged
andrepaim merged 1 commit into
masterfrom
fix/highlight-menu-scroll
Nov 16, 2026
Merged

andrepaim merged 1 commit into
masterfrom
fix/highlight-menu-scroll

Conversation

@andrepaim

Copy link
Copy Markdown
Owner

The bug

Clicking a highlight opens a small menu (Ask, Create post, colours, Delete). The menu closed on any scroll event 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

  • A new browser test opens the menu, scrolls the page from script and checks the menu stays; then checks that a wheel outside closes it and a wheel over the menu does not. It failed before the fix.
  • The three tests that had failed now and then: 75 of 75 passes on one worker.
  • Whole frontend Playwright suite: 198 passed. Typecheck and the secrets scan pass.

Not checked: a real touch screen, and trackpad momentum scrolling.

🤖 Generated with Claude Code

…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>
@andrepaim
andrepaim merged commit 12d724d into master Nov 16, 2026
9 checks passed
@andrepaim
andrepaim deleted the fix/highlight-menu-scroll branch November 16, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant