@hubpav/hwio-web-runtime 0.10.2 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nav.js +8 -3
- package/package.json +1 -1
package/dist/nav.js
CHANGED
|
@@ -140,7 +140,8 @@ export function hwioNavRuntime() {
|
|
|
140
140
|
if (!wasOpen)
|
|
141
141
|
hwioAnnouncePopup(pair.panel);
|
|
142
142
|
};
|
|
143
|
-
|
|
143
|
+
// 300 ms of grace: a slow or diagonal move from a trigger into its panel arrives before it closes.
|
|
144
|
+
const scheduleClose = () => { cancelClose(); closeTimer = setTimeout(closeAll, 300); };
|
|
144
145
|
pairs.forEach((pair) => {
|
|
145
146
|
const { trigger, panel } = pair;
|
|
146
147
|
trigger.addEventListener('click', () => {
|
|
@@ -161,12 +162,16 @@ export function hwioNavRuntime() {
|
|
|
161
162
|
panel.querySelector('a[href], button')?.focus();
|
|
162
163
|
}, { signal });
|
|
163
164
|
if (hoverable) {
|
|
164
|
-
trigger
|
|
165
|
+
// Hover follows the trigger's whole nav item (owner, 2026-11-03): it spans the bar's full height, so
|
|
166
|
+
// the pointer goes from the item straight into the panel under the bar, and neighbouring items meet,
|
|
167
|
+
// so moving along the nav switches the panel without closing it in between.
|
|
168
|
+
const zone = trigger.closest('li') ?? trigger;
|
|
169
|
+
zone.addEventListener('mouseenter', () => {
|
|
165
170
|
const wasOpen = isOpen(pair);
|
|
166
171
|
openOne(pair);
|
|
167
172
|
hoverOpened = wasOpen ? null : trigger;
|
|
168
173
|
}, { signal });
|
|
169
|
-
|
|
174
|
+
zone.addEventListener('mouseleave', scheduleClose, { signal });
|
|
170
175
|
panel.addEventListener('mouseenter', cancelClose, { signal });
|
|
171
176
|
panel.addEventListener('mouseleave', scheduleClose, { signal });
|
|
172
177
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubpav/hwio-web-runtime",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"description": "Framework-free browser runtime for the HARDWARIO websites: consent (Consent Mode v2 + GTM), HubSpot forms with Turnstile, attribution, theme, CTA tracking and small behaviours. View-transition safe.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|