@hortonstudio/main 1.6.3 → 1.6.4
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/autoInit/navbar.js +13 -13
- package/index.js +1 -1
- package/package.json +1 -1
package/autoInit/navbar.js
CHANGED
|
@@ -83,12 +83,9 @@ function setupDynamicDropdowns() {
|
|
|
83
83
|
item.setAttribute("tabindex", "0");
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
view: window,
|
|
90
|
-
});
|
|
91
|
-
wrapper.dispatchEvent(clickEvent);
|
|
86
|
+
// Trigger Webflow interaction
|
|
87
|
+
const wfIx = Webflow.require("ix3");
|
|
88
|
+
wfIx.emit("navbar_1_dropdown");
|
|
92
89
|
}
|
|
93
90
|
|
|
94
91
|
function closeDropdown() {
|
|
@@ -111,12 +108,9 @@ function setupDynamicDropdowns() {
|
|
|
111
108
|
toggle.focus();
|
|
112
109
|
}
|
|
113
110
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
view: window,
|
|
118
|
-
});
|
|
119
|
-
wrapper.dispatchEvent(clickEvent);
|
|
111
|
+
// Trigger Webflow interaction (reverse)
|
|
112
|
+
const wfIx = Webflow.require("ix3");
|
|
113
|
+
wfIx.emit("navbar_1_dropdown");
|
|
120
114
|
}
|
|
121
115
|
|
|
122
116
|
wrapper.addEventListener("mouseenter", () => {
|
|
@@ -244,7 +238,13 @@ function setupDynamicDropdowns() {
|
|
|
244
238
|
currentMenuItemIndex = menuItems.length - 1;
|
|
245
239
|
menuItems[currentMenuItemIndex].focus();
|
|
246
240
|
} else {
|
|
247
|
-
|
|
241
|
+
openDropdown();
|
|
242
|
+
if (menuItems.length > 0) {
|
|
243
|
+
setTimeout(() => {
|
|
244
|
+
currentMenuItemIndex = menuItems.length - 1;
|
|
245
|
+
menuItems[currentMenuItemIndex].focus();
|
|
246
|
+
}, 100);
|
|
247
|
+
}
|
|
248
248
|
}
|
|
249
249
|
} else if (e.key === "Escape") {
|
|
250
250
|
e.preventDefault();
|
package/index.js
CHANGED