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: Instance promise opened() seems to resolve before dialog's DOM elements are available #2586

@pixelnix

Description

@pixelnix

Here's a plunk:
http://plnkr.co/edit/EX34WiUsPheGMUfZEjCm?p=preview

Run that with the console open and you should see that when the dialog first opens, the element with id "target_container" doesn't yet exist in the DOM. If you wait a second and then click the link in the dialog, executing the code that checks for its existence, you should see that it finally exists.

I interpreted the semantics of the opened() promise as resolving after the dialog contents are "ready". But that doesn't seem to be the case? Is it a bug, or is that just not the semantics of opened()? If the latter, there doesn't seem to be any way to wait until the dialog is completely loaded and all its elements attached to the DOM.

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