summaryrefslogtreecommitdiffstats
path: root/docs/playlists.md
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-16 16:26:16 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-16 16:26:16 +0200
commit17ddd4de9087a98c87bec28a6b773572b1c58b50 (patch)
tree8ea8ee7cb57ecd8b0b428b089395c449621c102b /docs/playlists.md
parent2916aa376009283305a7acec4aafa3c96544499e (diff)
downloadmeshbay-17ddd4de9087a98c87bec28a6b773572b1c58b50.tar.gz
menu: do not close on the panel's own scrolling
The dismiss-on-scroll listener is on the capture phase, because `scroll` does not bubble — so it also heard the menu scrolling itself, and a long tracklist closed the moment it was wheeled. Filter on the event's origin. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'docs/playlists.md')
-rw-r--r--docs/playlists.md15
1 files changed, 11 insertions, 4 deletions
diff --git a/docs/playlists.md b/docs/playlists.md
index 49b1585..c450815 100644
--- a/docs/playlists.md
+++ b/docs/playlists.md
@@ -808,10 +808,17 @@ The codebase has no context menu and no dropdown outside the account menu in
button** — `icon.js` already has `dots` (`icon.js:54`). Both affordances, both
platforms: the button is visible on hover on a fine pointer and always visible
under `@media (pointer: coarse)`.
-- closes on Escape, on an outside click, and **on scroll**. The last one is not
- optional here: Music's toolbar is a sticky band and the grid scrolls beneath
- it, so a menu that survives a scroll is a menu now anchored to a different
- album than the one it was opened on.
+- closes on Escape, on an outside click, and **on a scroll of the page**. The
+ last one is not optional here: Music's toolbar is a sticky band and the grid
+ scrolls beneath it, so a menu that survives a scroll is a menu now anchored to
+ a different album than the one it was opened on. **Never on a scroll of its
+ own panel** — the panel is `overflow-y: auto` and a tracklist is routinely
+ taller than the window, so the two must be told apart by where the event came
+ from. `scroll` does not bubble, so that listener is on the capture phase,
+ which is also what made it hear the panel's own scrolling: the menu closed the
+ instant it was wheeled or its scrollbar dragged, and no track below the fold
+ could be reached. Measured by `menu_scroll_probe.py`; `playlist_ui_probe.py`
+ cannot see it, because `.click()` scrolls nothing.
- flips its anchor when it would open past the viewport edge, which on a phone
is most of the time.
- submenus **expand in place**, downward, at every width. This is the