@hypericon/mico 0.5.6 → 0.5.7
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.
|
@@ -102,8 +102,9 @@ class MenuManager {
|
|
|
102
102
|
}
|
|
103
103
|
// m.render(this.containerEl, menuVnode);
|
|
104
104
|
const asChild = (_b = options === null || options === void 0 ? void 0 : options.asChild) !== null && _b !== void 0 ? _b : menu_settings_1.MENU_SETTINGS.AS_CHILD;
|
|
105
|
-
if (asChild && (ev === null || ev === void 0 ? void 0 : ev.target) && ev.
|
|
106
|
-
|
|
105
|
+
if (asChild && (ev === null || ev === void 0 ? void 0 : ev.target) && ev.target instanceof HTMLElement) {
|
|
106
|
+
menu_settings_1.MENU_SETTINGS.DEBUG_MENU && console.log("Adding menu as child, event:", ev);
|
|
107
|
+
this.directParentEl = ev.target;
|
|
107
108
|
this.directParentWrapperEl = document.createElement("div");
|
|
108
109
|
this.directParentEl.append(this.directParentWrapperEl);
|
|
109
110
|
mithril_1.default.render(this.directParentWrapperEl, menuVnode);
|
|
@@ -102,8 +102,9 @@ class MenuManager {
|
|
|
102
102
|
}
|
|
103
103
|
// m.render(this.containerEl, menuVnode);
|
|
104
104
|
const asChild = (_b = options === null || options === void 0 ? void 0 : options.asChild) !== null && _b !== void 0 ? _b : menu_settings_1.MENU_SETTINGS.AS_CHILD;
|
|
105
|
-
if (asChild && (ev === null || ev === void 0 ? void 0 : ev.target) && ev.
|
|
106
|
-
|
|
105
|
+
if (asChild && (ev === null || ev === void 0 ? void 0 : ev.target) && ev.target instanceof HTMLElement) {
|
|
106
|
+
menu_settings_1.MENU_SETTINGS.DEBUG_MENU && console.log("Adding menu as child, event:", ev);
|
|
107
|
+
this.directParentEl = ev.target;
|
|
107
108
|
this.directParentWrapperEl = document.createElement("div");
|
|
108
109
|
this.directParentEl.append(this.directParentWrapperEl);
|
|
109
110
|
mithril_1.default.render(this.directParentWrapperEl, menuVnode);
|