Skip to content

Fix misc bugs: context menu dismiss, carousel demo, test hint, combobox category#42

Merged
avanelsas merged 1 commit intomainfrom
fix/misc-bugfixes
Apr 30, 2026
Merged

Fix misc bugs: context menu dismiss, carousel demo, test hint, combobox category#42
avanelsas merged 1 commit intomainfrom
fix/misc-bugfixes

Conversation

@avanelsas
Copy link
Copy Markdown
Owner

Summary

Four bugfixes in one PR:

  1. x-context-menu: Escape and click-outside don't dismiss — the layer element has pointer-events: none and no focus, so event listeners attached to it never fire. Moved Escape and click-outside handlers to document-level listeners (matching x-dropdown's pattern). Layer-level listeners retained for arrow key navigation and item clicks.

  2. x-carousel demo: control panel broken — switches, selects, and form-field inputs used wrong event names (change/input instead of x-switch-change/x-form-field-input/select-change) and read values from e.target instead of e.detail. Dynamic slide buttons used click instead of press.

  3. x-welcome-tour test: missing ^js type hint(.-stepsCompleted @detail) caused a Closure Advanced compilation warning due to missing type hint on the deref.

  4. x-combobox: undefined category in demo gallery — category was "input" which doesn't exist; changed to "form".

Test plan

  • x-context-menu: right-click to open, press Escape — menu closes
  • x-context-menu: right-click to open, click outside — menu closes
  • x-carousel demo: toggle autoplay/loop/disabled switches
  • x-carousel demo: change transition/direction selects
  • x-carousel demo: add/remove dynamic slides
  • x-combobox appears under "Form" category in demo gallery
  • npx shadow-cljs compile app — zero warnings
  • clj-kondo --lint src test — zero warnings

🤖 Generated with Claude Code

…ari, test hint, combobox category

- x-context-menu: Escape and click-outside now dismiss the menu.
  Moved handlers from the layer element (pointer-events:none, no
  focus) to document-level listeners, matching x-dropdown's pattern.
- x-button: add touch-action:manipulation and
  -webkit-tap-highlight-color:transparent to the internal button.
  Fixes missing press events on mobile Safari caused by all:unset
  resetting touch handling properties.
- x-carousel demo: control panel used wrong event names (change
  instead of x-switch-change, input instead of x-form-field-input,
  etc.) and wrong detail access (e.target vs e.detail).
- x-welcome-tour test: add missing ^js type hint on @detail deref
  to fix Closure Advanced compilation warning.
- x-combobox: fix undefined category in demo gallery (was "input",
  should be "form").

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avanelsas avanelsas merged commit 2bcbe60 into main Apr 30, 2026
1 check passed
@avanelsas avanelsas mentioned this pull request Apr 30, 2026
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