Skip to content

The Export menu could never open - #18

Merged
richard-epsilla merged 1 commit into
mainfrom
slides-export-menu
Aug 13, 2026
Merged

richard-epsilla merged 1 commit into
mainfrom
slides-export-menu

Conversation

@richard-epsilla

Copy link
Copy Markdown
Contributor

Independent of the dead endpoint: DeckBanner listened for click on window with no containment check. React 18 flushes effects synchronously during a discrete event, so the listener attached while the opening click was still propagating and closed the menu before paint.

Now mousedown + contains(), matching AvatarMenu in the same file.

🤖 Generated with Claude Code

https://claude.ai/code/session_013DCjqvx3L4VKAPnFaPe7YJ

Separate from the dead endpoint: even with a working handler behind it, the
menu closed itself the instant it opened. DeckBanner listened for `click` on
window with no containment check, and React 18 flushes state and effects
synchronously during a discrete event — so the listener was attached while the
very click that opened the menu was still propagating, and it closed it again
before paint.

Fixed to the pattern AvatarMenu in this same file already uses: mousedown, plus
a contains() check so a click inside the menu does not dismiss it.

Found by driving it: the button reported enabled, on top, and its handler ran,
yet .sl-export-menu never appeared in the DOM.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013DCjqvx3L4VKAPnFaPe7YJ
@richard-epsilla
richard-epsilla merged commit 012aca6 into main Aug 13, 2026
1 check passed
@richard-epsilla
richard-epsilla deleted the slides-export-menu branch August 13, 2026 09:27
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