Skip to content

bug: Nav pop() does not show correct enteringView within a Modal #25637

Closed
@sean-perkins

Description

@sean-perkins

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

When using nav.pop() there is a couple of behaviors that are incorrect:

  1. The leavingView (the view being removed) is not unmounted/removed from the DOM.
  2. The enteringView (the view to display) is not visible. The enteringView is being transitioned under another view in the stack.

Expected Behavior

When calling nav.pop(), Nav should unmount/destroy the view that is being removed (the topmost view). Additionally, the next available view that I was just from, should display as the new topmost view.

Steps to Reproduce

  1. Open reproduction
  2. Click "Open Modal"
  3. Click "Go To Page Two"
  4. Click "Go To Page Three"
  5. Click "Go Back"
  6. Observe: Page One is displayed, expected Page Two to display.
  7. Observe: page-one, page-two and page-three are all still in the DOM. Expected only page-one and page-two.
  8. Observe: page-one has a higher z-index than page-two. Expected that page-two would have a higher z-index than page-one.

Code Reproduction URL

https://stackblitz.com/edit/r1sn2g?file=index.html

Ionic Info

N/A

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions