mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix TouchTargetHelper to correctly use the overflowInset information
Summary: The overflowInset uses negative values to indicate extending from parent view. This diff fixes the math so that it's correctly check if the point is within overflowInset. Changelog [Android][Fixed] - Fix math for detecting if children views are in parent's overflowInset area. Reviewed By: genkikondo Differential Revision: D33750129 fbshipit-source-id: 1a5a33a227280c687b158b4a81a56017b6f4f3e0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
86fa2a5106
commit
45244ebce2
@@ -271,8 +271,8 @@ public class TouchTargetHelper {
|
||||
}
|
||||
|
||||
final Rect overflowInset = ((ReactOverflowViewWithInset) view).getOverflowInset();
|
||||
return (x >= -overflowInset.left && x < view.getWidth() - overflowInset.right)
|
||||
&& (y >= -overflowInset.top && y < view.getHeight() - overflowInset.bottom);
|
||||
return (x >= overflowInset.left && x < view.getWidth() - overflowInset.right)
|
||||
&& (y >= overflowInset.top && y < view.getHeight() - overflowInset.bottom);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user