mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-10 22:47:58 +08:00
Fix measureInWindow for view-backed Nodes
Summary: This patch fixes measureInWindow for Nodes backed by Views. Whereas the intention was to call the super implementation when we have a Node backed by a View, we instead called the super implementation of measure, which doesn't measure relative to window. Differential Revision: D3607890
This commit is contained in:
@@ -195,7 +195,11 @@ public class FlatUIImplementation extends UIImplementation {
|
||||
FlatShadowNode node = (FlatShadowNode) resolveShadowNode(reactTag);
|
||||
if (node.mountsToView()) {
|
||||
mStateBuilder.ensureBackingViewIsCreated(node);
|
||||
super.measure(reactTag, callback);
|
||||
if (relativeToWindow) {
|
||||
super.measureInWindow(reactTag, callback);
|
||||
} else {
|
||||
super.measure(reactTag, callback);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user