File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -548,18 +548,22 @@ export class Manager extends ManagerBase {
548548
549549 findRegistry ( view : View ) : com . swmansion . gesturehandler . GestureHandlerRegistryImpl {
550550 let registry : com . swmansion . gesturehandler . GestureHandlerRegistryImpl ;
551+ let parent = view . parent ;
552+ // first test for GestureRootView
553+ // otherwise it could fail with components like BottomSheet
554+ // where the bottomSheet parent is set to app rootView (which could be a page)
555+ // thus the registry to add the handler would not be the same
556+ // as the one use for touch
557+ while ( parent ) {
558+ if ( parent instanceof GestureRootView ) {
559+ return parent . registry ;
560+ }
561+ parent = parent . parent ;
562+ }
563+
551564 const page = view . page as PageGestureExtended ;
552565 if ( page ) {
553566 registry = page . registry ;
554- } else {
555- // no root page try to find a parent GestureRootView
556- let parent = view . parent ;
557- while ( parent ) {
558- if ( parent instanceof GestureRootView ) {
559- return parent . registry ;
560- }
561- parent = parent . parent ;
562- }
563567 }
564568 return registry ;
565569 }
You can’t perform that action at this time.
0 commit comments