Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Modal backdrop broken for previous modal when stacking modals #1653

Closed
@chrisirhc

Description

@chrisirhc

See:
http://plnkr.co/edit/cBzJvvBrDUbZ9mDbwdT3?p=preview

Click Open Me, and then click Open Me in the modal and then again in the modal.

You'll see that the previous modal isn't covered by the backdrop but the modal behind that is covered.

This is because the backdrop isn't right before the topmost modal and the previous modal has the same z-index as the backdrop.

Two ways to fix this:

  1. Increase the backdrop's z-index by 1 when its index is > 0 (so that it'll always be higher than any previous modal if there's one). This is the least complicated way as it still works with the same index variable with only changes in the template.
  2. Move the backdrop to the topmost modal that requests for a backdrop (backdrop isn't set to false). Always move the backdrop when creating a new modal that requests for a backdrop. Need to remember to move it back whenever closing the modal. This is quite complicated.

The first way is a quick fix. Just wondering if anybody else has thoughts on this.

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