Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Bug Dialog in AngularJS@1.4.4 #12990

Closed
moacir-selinger opened this issue Oct 1, 2015 · 9 comments
Closed

Bug Dialog in AngularJS@1.4.4 #12990

moacir-selinger opened this issue Oct 1, 2015 · 9 comments

Comments

@moacir-selinger
Copy link

Built a module to manage the loading templates for Modal Bootstrap. After upgrading my version of angularjs@1.4.4, to close a Modal, I can not open it.

Simulation: (http://embed.plnkr.co/3fLH5OaVQrnzalj8831U/preview)
Open your console in the browser, click the "Open Modal" button, it opened perfectly and the island was writing an element I scored. After open, close the Modal and try to open it again, see that it was no longer displayed. Note that the console the writing element is different from the first time it was opened.

Note: Change the version of angularjs@1.4.3 and see that the problem does not happen.

@gkalpak
Copy link
Member

gkalpak commented Oct 2, 2015

I think it, having a more concise reproduction would help.
(I.e. one with less moving parts/dependencies.)

@fernandomoraes
Copy link

bug in my app too

@Narretz Narretz added this to the Purgatory milestone Oct 4, 2015
@Narretz
Copy link
Contributor

Narretz commented Oct 4, 2015

It seems in the plnkr, a file called bootstrap-modal.js is missing.

@moacir-selinger
Copy link
Author

Okay @Narretz , this bootstrap-modal.js import was a modified version of Bootstrap, but could simulate the problem using the original version of them just forgot to remove the import, I'm sorry.

Towards a more concise playing, I do not know how to do, I cleared my code as much as I could without compromising the flow of my scenario. Right now, I need your help with more skills on the subject.

Simulation: http://embed.plnkr.co/3fLH5OaVQrnzalj8831U/preview

Thank you!

@Narretz
Copy link
Contributor

Narretz commented Oct 5, 2015

It's because of this commit: 6838c97 It does seem to have side-effect after all, but we need to investigate more (you are welcome to look at it, too).

@Narretz
Copy link
Contributor

Narretz commented Oct 8, 2015

@lgalfaso Do you think you could take a look at this? It seems to happen because of the $q performance improvement you committted.

@fernandomoraes
Copy link

removing the lines of commit, works fine!

@Narretz
Copy link
Contributor

Narretz commented Feb 17, 2016

I've checked this again, and this is a bug in the dialog directive. This has only worked before by chance, because the directive is doing some really odd stuff.
First, the dialog directive is compiled. Then, after the content promise is resolved, it is compiled and appended to the dialog. But because the dialog is replaced and has a templateUrl, the content wasn't correctly appended to the dialog on the second try. What you should do is to append the content to the dialog, and then compile it. http://plnkr.co/edit/4OwrRINQplQ00zioSPOm?p=preview
The directive is also leaking dom nodes when the modal is closed, so you should investigate this.

@Narretz Narretz closed this as completed Feb 17, 2016
@fernandomoraes
Copy link

@HenriqueLimas

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants