Skip to content

Keep native modified clicks on link menu triggers - #333

Merged
silveltman merged 1 commit into
mainfrom
fix/on-media-modified-clicks-20261024
Oct 24, 2026
Merged

silveltman merged 1 commit into
mainfrom
fix/on-media-modified-clicks-20261024

Conversation

@silveltman

@silveltman silveltman commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

While a controller is downloading, a modified click on a link trigger was prevented and later replayed as a plain click. On VDA this replaced the browser's native Meta-click new-tab behavior with current-tab navigation.

onMedia now leaves modified and non-primary clicks on link triggers to the browser. Plain click and Enter, button triggers, programmatic requests and media-exit cancellation keep their existing behavior. All eight registry styles are regenerated; no API, dependency, CSS or layout changes.

Validation at 8249ecb9fc487905a6289292800bdeb82b64c5bc:

  • Full source check passes: 991 files, 0 errors/warnings/hints; one existing knip configuration hint. Build has 0 critical, 503 existing warnings and 357 hints.
  • Unit 57/57 and browser 117/117 across Chromium, Firefox and WebKit. Negative controls fail exactly the affected modified-link cases on the released helper.
  • Independent review found no actionable defects or required upstream coverage gaps.
  • Matching Netlify preview 6add2543404bebc124a68668 serves all eight exact helper hashes. Parent explored desktop navigation and mobile docs navigation, including Escape and restored focus.

Native modifier behavior varies by platform. Upstream browser tests verify that the helper neither prevents nor replays those clicks, then stop the native action themselves. VDA's actual Meta tab creation, platform-specific Control behavior, category navigation and cancellation will be checked after this release is officially installed there. Required CI and production verification complete the release.

While a controller import is pending, onMedia held every trigger click and
replayed it as a plain click after mounting. On a trigger that is a link,
such as a category anchor in a navigation menu, a Cmd/Ctrl, Shift or Alt
click or a non-primary click lost its native action: instead of a new tab,
window or download, the page navigated after the import.

These clicks now keep their native action and are not replayed. Plain
clicks and Enter on links, and every click on a button trigger, are still
held and replayed once the controller mounts, and media exits still cancel
them. All eight registry styles are regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fulldev-ui ready!

Name Link
🔨 Latest commit 8249ecb
🔍 Latest deploy log https://app.netlify.com/projects/fulldev-ui/deploys/6add2543404bebc124a68668
😎 Deploy Preview https://deploy-preview-333--fulldev-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@silveltman
silveltman marked this pull request as ready for review October 24, 2026 21:50
@silveltman
silveltman merged commit 10427be into main Oct 24, 2026
9 checks passed
@silveltman
silveltman deleted the fix/on-media-modified-clicks-20261024 branch October 24, 2026 21:58
silveltman added a commit that referenced this pull request Oct 26, 2026
Dialog, Sheet and NavigationMenu import their Data Slot controller
statically and call `create()`, like the other Data Slot components,
instead of loading it per media query (#331 to #333).

- Removes the `onMedia` helper, `src/lib/dialog.ts`, the `on-media`
registry item, the responsive activation docs and their tests. No custom
loader, no loading props.
- `media` stays accepted on the three components with no effect and is
not rendered, so hosted-registry installs since #331 that pass it still
type-check.
- Header blocks 1 to 5 keep `fold="lg" | "xl"` and close the sheet or
navigation menu the layout hides at that breakpoint, which releases the
scroll lock.
- Every Data Slot root script also binds on `astro:after-swap`, before a
site's own `astro:page-load` listeners after ClientRouter navigation;
published `create()` skips bound roots.
- Published `@data-slot/*` ^1.1.2 and Liquid are unchanged. All eight
styles regenerated.
- Changeset: minor (removes a hosted registry item; folds into the
pending 0.26.0 in #330).

Sites that installed the hosted helpers can delete `src/lib/on-media.ts`
and `src/lib/dialog.ts` once nothing imports them.

Validation at `6f8b6aaed`: `vp run check` passes (988 files, 0
errors/warnings/hints; one existing knip configuration hint; registry
matches). Unit 33/33. Build: 0 critical, 503 existing warnings, 357
hints. Browser 67/67 over Chromium, Firefox and WebKit, including all
five headers at both folds (resize closing, scroll unlock, keyboard),
ClientRouter teardown and a site page-load command after navigation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- codesmith:footer -->
---
<a
href="https://app.blacksmith.sh/fulldotdev/codesmith/ui/pr/334?autoLogin=true&ref=codesmith_pr_footer"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"><img
alt="View with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png"
width="162" height="28"></picture></a> <a
href="https://backend.blacksmith.sh/track/enable-autofix?expires=1795605680&installation_model_id=442937&pr_number=334&ref=codesmith_pr_footer&repository=fulldotdev%2Fui&return_to=https%3A%2F%2Fgithub.com%2Ffulldotdev%2Fui%2Fpull%2F334&signature=d7fb5d0be6a73d145913bee3421c8644b601fbc9be00eeabc33a5c82851a02c3"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img
alt="Autofix with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png"
width="190" height="28"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you
need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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