Summary:
There is an assert in FlatViewGroup.reactTagForTouch() that says that TouchTargetHelper should not allow returning getId() when pointer events are BOX_NONE. This is not entirely accurate.

This acturally method is invoked in 2 different contexts. Main context is to find a touch target, and in that context the method indeed should never return getId() if pointer events are BOX_NONE. There is however a TouchTargetHelper which actually expects that reactTagForTouch() *may* return getId(), in which case it will perform logic to not all this method be invoked again from main context.

In other words, this assert needs to be removed because it is entirely possible to return getId() when pointer events are BOX_NONE. Ideally, these would be 2 different methods, but ReactCompoundView interface only defines a single reactTagForTouch() method.

Reviewed By: ahmedre

Differential Revision: D2873931
This commit is contained in:
Denis Koroskin 2016-01-28 17:36:14 -08:00 коммит произвёл Ahmed El-Helw
Родитель d9ed1a84c5
Коммит 05e8ff1fe0
1 изменённых файлов: 0 добавлений и 4 удалений

Просмотреть файл

@ -129,10 +129,6 @@ import com.facebook.react.views.image.ImageLoadEvent;
}
}
SoftAssertions.assertCondition(
mPointerEvents != PointerEvents.BOX_NONE,
"TouchTargetHelper should not allow returning getId() when pointer events are BOX_NONE");
// no children found
return getId();
}