Fix bug with hittesting when skipping views due to overflow
Summary: Noticed we were sometimes receiving incorrect paths through the view hierarchy. This was largely harmless, as the hover events generated from this would still be correct. We just sometimes send more onExit/onEnter events than necessary. Changelog: [Internal] Reviewed By: rshest Differential Revision: D31434300 fbshipit-source-id: 3888270eaa16edf48f5d894a1e6daeca1ecfed1e
This commit is contained in:
Родитель
37efe38e6c
Коммит
ec31b38ef1
|
@ -182,7 +182,6 @@ public class TouchTargetHelper {
|
|||
eventCoords[0] = childPoint.x;
|
||||
eventCoords[1] = childPoint.y;
|
||||
View targetView = findTouchTargetViewWithPointerEvents(eventCoords, child, pathAccumulator);
|
||||
|
||||
if (targetView != null) {
|
||||
// We don't allow touches on views that are outside the bounds of an `overflow: hidden`
|
||||
// View
|
||||
|
@ -196,6 +195,9 @@ public class TouchTargetHelper {
|
|||
}
|
||||
if (inOverflowBounds) {
|
||||
return targetView;
|
||||
} else if (pathAccumulator != null) {
|
||||
// Not a hit, reset the path found so far
|
||||
pathAccumulator.clear();
|
||||
}
|
||||
}
|
||||
eventCoords[0] = restoreX;
|
||||
|
|
Загрузка…
Ссылка в новой задаче