fix inspecting text elements
Differential Revision: D2663651 fb-gh-sync-id: 2b583fecf5fa7a88f071a7441d03b95d21b8620f
This commit is contained in:
parent
fc511f0730
commit
8491b579c8
|
@ -835,4 +835,17 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
|
|||
mOperationsQueue.enqueueSendAccessibilityEvent(tag, eventType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the first non-virtual (i.e. native) parent view tag of the react view with the passed tag.
|
||||
* If the passed tag represents a non-virtual view, the same tag is returned. If the passed tag
|
||||
* doesn't map to a react view, or a non-virtual parent cannot be found, -1 is returned.
|
||||
*/
|
||||
/* package */ int getNonVirtualParent(int reactTag) {
|
||||
ReactShadowNode node = mShadowNodeRegistry.getNode(reactTag);
|
||||
while (node != null && node.isVirtual()) {
|
||||
node = node.getParent();
|
||||
}
|
||||
return node == null ? -1 : node.getReactTag();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -383,10 +383,11 @@ public class UIViewOperationQueue {
|
|||
final float containerX = (float) mMeasureBuffer[0];
|
||||
final float containerY = (float) mMeasureBuffer[1];
|
||||
|
||||
final int touchTargetReactTag = mNativeViewHierarchyManager.findTargetTagForTouch(
|
||||
mReactTag,
|
||||
mTargetX,
|
||||
mTargetY);
|
||||
final int touchTargetReactTag = mUIManagerModule.getNonVirtualParent(
|
||||
mNativeViewHierarchyManager.findTargetTagForTouch(
|
||||
mReactTag,
|
||||
mTargetX,
|
||||
mTargetY));
|
||||
|
||||
try {
|
||||
mNativeViewHierarchyManager.measure(
|
||||
|
|
Loading…
Reference in New Issue