@rectify-dev/core 2.4.1 → 2.4.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/index.cjs +5 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -72,10 +72,6 @@ function unmarkContainerAsRoot(node) {
|
|
|
72
72
|
node[internalContainerInstanceKey] = null;
|
|
73
73
|
}
|
|
74
74
|
chunkAJJIEZ7G_cjs.__name(unmarkContainerAsRoot, "unmarkContainerAsRoot");
|
|
75
|
-
function isContainerMarkedAsRoot(node) {
|
|
76
|
-
return !!node[internalContainerInstanceKey];
|
|
77
|
-
}
|
|
78
|
-
chunkAJJIEZ7G_cjs.__name(isContainerMarkedAsRoot, "isContainerMarkedAsRoot");
|
|
79
75
|
var precacheFiberNode = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((fiber, node) => {
|
|
80
76
|
if (!node) return;
|
|
81
77
|
node[internalInstanceKey] = fiber;
|
|
@@ -141,7 +137,7 @@ var dispatchEvent = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((domEventName, targ
|
|
|
141
137
|
if (!targetFiber) return;
|
|
142
138
|
let domCursor = targetNode.parentNode;
|
|
143
139
|
while (domCursor && domCursor !== targetContainer) {
|
|
144
|
-
if (
|
|
140
|
+
if (isEventContainer(domCursor)) return;
|
|
145
141
|
domCursor = domCursor.parentNode;
|
|
146
142
|
}
|
|
147
143
|
const syntheticEvent = new SyntheticEvent_default(nativeEvent);
|
|
@@ -184,6 +180,7 @@ chunkAJJIEZ7G_cjs.__name(addEventCaptureListener, "addEventCaptureListener");
|
|
|
184
180
|
|
|
185
181
|
// ../rectify-dom-binding/src/events/RectifyEvent.ts
|
|
186
182
|
var listeningMarker = "_rectifyEventListening$" + Math.random().toString(36).slice(2);
|
|
183
|
+
var isEventContainer = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((dom) => !!dom[listeningMarker], "isEventContainer");
|
|
187
184
|
var listenToAllEventSupported = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((dom) => {
|
|
188
185
|
if (dom[listeningMarker]) return;
|
|
189
186
|
dom[listeningMarker] = true;
|
|
@@ -1598,6 +1595,9 @@ var commitMutation = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((fiber) => {
|
|
|
1598
1595
|
case HostText:
|
|
1599
1596
|
commitMutationHostText(fiber);
|
|
1600
1597
|
break;
|
|
1598
|
+
case PortalComponent:
|
|
1599
|
+
listenToAllEventSupported(fiber.stateNode);
|
|
1600
|
+
break;
|
|
1601
1601
|
}
|
|
1602
1602
|
}, "commitMutation");
|
|
1603
1603
|
|
|
@@ -1787,7 +1787,6 @@ var createRoot = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((container) => {
|
|
|
1787
1787
|
};
|
|
1788
1788
|
}, "createRoot");
|
|
1789
1789
|
var createPortal = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((children, container, key = null) => {
|
|
1790
|
-
listenToAllEventSupported(container);
|
|
1791
1790
|
return {
|
|
1792
1791
|
$$typeof: shared.RECTIFY_PORTAL_TYPE,
|
|
1793
1792
|
type: null,
|