Skip to content

Commit 354dab2

Browse files
committed
Dimming view
1 parent 9a9f8b4 commit 354dab2

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,9 +578,15 @@ class GestureHandlerOrchestrator(
578578
}
579579

580580
if (view is ReactCompoundView) {
581-
val tagForCoords = view.reactTagForTouch(coords[0], coords[1])
581+
// Some implementations (e.g. RNScreens' DimmingView) intentionally throw from `reactTagForTouch`
582+
val tagForCoords =
583+
try {
584+
view.reactTagForTouch(coords[0], coords[1])
585+
} catch (e: IllegalStateException) {
586+
null
587+
}
582588

583-
if (tagForCoords != view.id) {
589+
if (tagForCoords != null && tagForCoords != view.id) {
584590
handlerRegistry.getHandlersForViewWithTag(tagForCoords)?.let {
585591
synchronized(it) {
586592
for (handler in it) {

0 commit comments

Comments
 (0)