|
@@ -91,13 +91,10 @@ export default class CoreSystem {
|
|
let targets = event.path.map(item => findReactElement(item));
|
|
let targets = event.path.map(item => findReactElement(item));
|
|
let resViewNode = null;
|
|
let resViewNode = null;
|
|
for (var i in targets) {
|
|
for (var i in targets) {
|
|
- if(targets[i] !== null){
|
|
|
|
- if(targets[i].props && targets[i].props.ID) {
|
|
|
|
- resViewNode = targets[i].props.ID;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ if(targets[i] && targets[i].ID) {
|
|
|
|
+ resViewNode = targets[i].ID;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
let ViewID = this.Routing.getCurrentView();
|
|
let ViewID = this.Routing.getCurrentView();
|
|
return this.ViewSystem.getNode(ViewID, resViewNode);
|
|
return this.ViewSystem.getNode(ViewID, resViewNode);
|
|
@@ -113,7 +110,7 @@ export default class CoreSystem {
|
|
const findReactElement = (node) => {
|
|
const findReactElement = (node) => {
|
|
for (var key in node) {
|
|
for (var key in node) {
|
|
if (key.startsWith("__reactInternalInstance$")) {
|
|
if (key.startsWith("__reactInternalInstance$")) {
|
|
- return (node[key]._debugOwner && node[key]._debugOwner.stateNode) || (node[key].stateNode);
|
|
|
|
|
|
+ return (node[key]._debugOwner && node[key]._debugOwner.stateNode.props) || (node[key].stateNode.memoizedProps);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|