File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ export default class Drawer extends Component {
244244 this . _panning = false
245245 this . shouldOpenDrawer ( gestureState . dx ) ? this . open ( ) : this . close ( )
246246 } ;
247-
247+
248248 onStartShouldSetPanResponderCapture = ( e , gestureState ) => {
249249 if ( this . shouldCaptureGestures ( ) ) return this . processShouldSet ( e , gestureState )
250250 return false
@@ -294,6 +294,8 @@ export default class Drawer extends Component {
294294 processShouldSet = ( e , gestureState ) => {
295295 let inMask = this . testPanResponderMask ( e , gestureState )
296296 if ( ! inMask ) return false
297+ // skip gesture process if we have mostly vertical swipe
298+ if ( Math . abs ( gestureState . dy ) >= Math . abs ( gestureState . dx ) ) return false
297299 this . _panStartTime = Date . now ( )
298300 if ( inMask && this . shouldCaptureGestures ( ) ) return true
299301 if ( this . props . negotiatePan ) return false
@@ -398,7 +400,7 @@ export default class Drawer extends Component {
398400 if ( typeof type === 'function' ) {
399401 type ( ) // this is actually a callback
400402 } else cb && cb ( )
401-
403+
402404 }
403405 } )
404406 } ;
You can’t perform that action at this time.
0 commit comments