Skip to content

[Modal] Dimmer not hiding if multiple modals animating #2441

@mareeo

Description

@mareeo

Bug Report

When a modal is hidden, it checks for other modals and if there are no other active or animating modals it hides the modal dimmer. This happens on the hiding animation start. If two modals start hiding at the same time, neither of them will hide the dimmer. This leaves you with a dimmer with no modals

Steps to reproduce

  1. Create a modal.
  2. Create another modal.
  3. Hide the second modal.
  4. While the second modal is animating with its hide, hide the first modal.

Expected result

Modal dimmer should be hidden

Actual result

The modal dimmer stay visible and active with no modals in it.

Testcase

https://jsfiddle.net/xmd9eht6/

Version

2.8.8

Potential Solution

  • Don't start hiding first modal until second modal is hidden. This is the current workaround I'm doing.
  • Use the modal's hide all or hide dimmer functions.
  • (Code change) When hiding a modal, instead of doing the check for other modals and hiding the dimmer on hide animation onStart, do all this on hide animation onComplete.

I can make a pull request if others think this would be an appropriate fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    state/has-prAn issue which has a related PR opentype/bugAny issue which is a bug or PR which fixes a bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions