Skip to content

Navigation events are delayed until scrolling completes #4708

@cjroth

Description

@cjroth

Issue Description

Navigation events are delayed until scrolling completes

Steps to Reproduce / Code Snippets / Screenshots

Setup:

  1. Create a stack layout with a top bar and add a menu button to the top bar
  2. In the stack layout screen, add a ScrollView with a large height (eg 10000)
  3. Add an event listener for navigation button events that opens an overlay when the button is pressed

Issue:

  1. Scroll the Scroll View and let momentum scrolling take over
  2. Press the menu button in the top bar while it's still scrolling

Problem:
The navigation overlay waits until scrolling stops to open, which results in a delay of up to a few seconds. This is not intuitive and differs from the behavior of bottom tabs (which navigate instantly regardless of scroll). After looking through React Native docs I wasn't able to find any programatic way to stop momentum scrolling when user taps outside of area.

If you add a button to open an overlay INSIDE of the stack screen instead of the top bar, it will open the overlay immediately.


Environment

  • React Native Navigation version: 0.57
  • React Native version: 2.8.0
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): iPhone X, iPhone 8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions