@rectify-dev/core 2.4.0 → 2.4.1
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 +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -72,6 +72,10 @@ 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");
|
|
75
79
|
var precacheFiberNode = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((fiber, node) => {
|
|
76
80
|
if (!node) return;
|
|
77
81
|
node[internalInstanceKey] = fiber;
|
|
@@ -135,6 +139,11 @@ var dispatchEvent = /* @__PURE__ */ chunkAJJIEZ7G_cjs.__name((domEventName, targ
|
|
|
135
139
|
const targetNode = getEventTarget(nativeEvent);
|
|
136
140
|
const targetFiber = getFiberNodeCached(targetNode);
|
|
137
141
|
if (!targetFiber) return;
|
|
142
|
+
let domCursor = targetNode.parentNode;
|
|
143
|
+
while (domCursor && domCursor !== targetContainer) {
|
|
144
|
+
if (isContainerMarkedAsRoot(domCursor)) return;
|
|
145
|
+
domCursor = domCursor.parentNode;
|
|
146
|
+
}
|
|
138
147
|
const syntheticEvent = new SyntheticEvent_default(nativeEvent);
|
|
139
148
|
const path = [];
|
|
140
149
|
let fiber = targetFiber;
|