Skip to content

Drawer doesn't open after fast double click. Primarily because the drawer and its state are out of sync #1960

@jainniket

Description

@jainniket

###Project
https://github.com/jainniket/drawer-issue

afof7b

Current Behavior

There is a Hamburger Menu on whose click DrawerOpen action is triggered.
But when, that menu is tapped twice very fast, the drawer opens and closes back, but the state is still set as Open.

So the error is, once the menu is clicked, it opens the drawer, but in the transition phase, when the drawer is opening, another tap happens which eventually happens to be on the View being presented by Drawer. This tap forces the menu to close back but the action DrawerClose doesn't get registered.

Whereas the redux state says the current route as DrawerOpen even though the drawer is clossed. So any further taps on the menu icon becomes un-responsive.

Reason - The drawer presented and drawer state are out of sync.

Expected Behavior

The double tap should be disabled.
The presenting view of drawer shouldn't take any touch event.

Your Environment

software version
react-navigation ^1.0.0-beta.11
react-native 0.45.1
node v7.6.0
npm or yarn v4.1.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions