Skip to content

Modal opened promise resolves before modal is added to DOM #294

Description

@jogjayr

Steps to repro:

Open a modal using the code below -

$modal.open({
  templateUrl: '<some_url>',
  backdrop: 'static',
  windowClass: 'myCustomModalContainerClass'
}).opened.then(function() {
  angular.element('.reveal-modal-bg').addClass('myCustomModalBg');
});

Expected:

  • angular.element('.reveal-modal-bg') should refer to the modal bg
  • Modal should appear before the opened promise resolves
  • 'myCustomModalBg' should be added as a class to it

Actual:

  • angular.element('.reveal-modal-bg') === []
  • Modal hasn't appeared when the opened promise resolves
  • Custom class isn't added

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions