@rectify-dev/core 2.4.2 → 2.4.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/dist/index.cjs +8 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -135,11 +135,6 @@ var dispatchEvent = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((domEventName, targ
|
|
|
135
135
|
const targetNode = getEventTarget(nativeEvent);
|
|
136
136
|
const targetFiber = getFiberNodeCached(targetNode);
|
|
137
137
|
if (!targetFiber) return;
|
|
138
|
-
let domCursor = targetNode.parentNode;
|
|
139
|
-
while (domCursor && domCursor !== targetContainer) {
|
|
140
|
-
if (isEventContainer(domCursor)) return;
|
|
141
|
-
domCursor = domCursor.parentNode;
|
|
142
|
-
}
|
|
143
138
|
const syntheticEvent = new SyntheticEvent_default(nativeEvent);
|
|
144
139
|
const path = [];
|
|
145
140
|
let fiber = targetFiber;
|
|
@@ -180,9 +175,13 @@ chunkAJJIEZ7G_cjs.__name(addEventCaptureListener, "addEventCaptureListener");
|
|
|
180
175
|
|
|
181
176
|
// ../rectify-dom-binding/src/events/RectifyEvent.ts
|
|
182
177
|
var listeningMarker = "_rectifyEventListening$" + Math.random().toString(36).slice(2);
|
|
183
|
-
var isEventContainer = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((dom) => !!dom[listeningMarker], "isEventContainer");
|
|
184
178
|
var listenToAllEventSupported = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((dom) => {
|
|
185
179
|
if (dom[listeningMarker]) return;
|
|
180
|
+
let ancestor = dom?.parentNode ?? null;
|
|
181
|
+
while (ancestor) {
|
|
182
|
+
if (ancestor[listeningMarker]) return;
|
|
183
|
+
ancestor = ancestor.parentNode;
|
|
184
|
+
}
|
|
186
185
|
dom[listeningMarker] = true;
|
|
187
186
|
allNativeEvents.forEach(
|
|
188
187
|
(domEventName) => listenToNativeEvent(domEventName, dom)
|
|
@@ -1595,6 +1594,9 @@ var commitMutation = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((fiber) => {
|
|
|
1595
1594
|
case HostText:
|
|
1596
1595
|
commitMutationHostText(fiber);
|
|
1597
1596
|
break;
|
|
1597
|
+
case PortalComponent:
|
|
1598
|
+
listenToAllEventSupported(fiber.stateNode);
|
|
1599
|
+
break;
|
|
1598
1600
|
}
|
|
1599
1601
|
}, "commitMutation");
|
|
1600
1602
|
|
|
@@ -1784,7 +1786,6 @@ var createRoot = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((container) => {
|
|
|
1784
1786
|
};
|
|
1785
1787
|
}, "createRoot");
|
|
1786
1788
|
var createPortal = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((children, container, key = null) => {
|
|
1787
|
-
listenToAllEventSupported(container);
|
|
1788
1789
|
return {
|
|
1789
1790
|
$$typeof: shared.RECTIFY_PORTAL_TYPE,
|
|
1790
1791
|
type: null,
|