Skip to content

Consider cancelling pending forward navigations when going back #13

@esprehn

Description

@esprehn

Queued forward navigations should automatically cancel when executing a backwards navigation.

ex. In the photo gallery example:

  1. Start on /photos/2
  2. Click Next button which starts a navigation to /photos/3 with pushNewEntry(callback)
  3. Navigation event fires and respondWith() starts a 500ms animation
  4. Click Next 9 more times queuing 9 callbacks with pushNewEntry(callback)
  5. Click Back button taking you to /photos/1
  6. No more navigations happen, all 9 callbacks are cancelled.

The expected user behavior is not that the app goes back to /photos/1 and then jumps forward 9 times, but that all pending forward navigations are cancelled whenever going backwards.

I don't think this should be done manually through an AbortSignal. In practice the queued navigations are likely to come out of third party libraries or unrelated components.

Metadata

Metadata

Assignees

No one assigned

    Labels

    foundationalFoundational open questions whose resolution may change the model dramatically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions