-
Notifications
You must be signed in to change notification settings - Fork 6.7k
display issues when opening modal #5183
Comments
Thanks for the report. |
I am experiencing the same issue. It looks like for me it is rendering the content of the modal (with code from angular such as |
same here |
This is preventing us from upgrading our apps to 1.0. All our karma tests that open modals are broken, and I can't figure out how to fix them. They look like this: where the contents above the navbar should be in a modal. I've blindly tried a few combinations of As far as I can tell, these are all the changes in 1.0.0 that affected modals: 726ccc3 b8969d1 e9c4977 2635f0d 742132a e28cced. I imagine this has to have been introduced in one of those? |
@jasonwells, @serhalp - please do not hijack the thread. If you are experiencing the same issue then all you need to do is indicate thus - or better yet, help us investigate the issue. If you are experiencing a different issue, then you need to follow the instructions here. Secondly, all of you need to make sure you look at the CHANGELOG to ensure none of the breaking changes affect you. By far the biggest one is the removal of all the old directive names. Prior to 1.0, but only in 0.14.x, you would get deprecation warning messages in your console about the change and how to mitigate (namely add a Finally, 1.0 is only compatible with Angular 1.4+, so please make sure you're using that. All that said, we're aware of the original issue posted by @jessehart. |
Seeing this too. What appears to happen is an element looking like
is inserted at the top of the The modal dialog should be cloaked / hidden until it is completely compiled. |
I'm currently working around this via the following CSS
|
Seeing this too! |
Confirmed that the workaround posted by @philBrown works as a temporary fix, thanks for that! 😄 |
have also seen this bug (tip: use the 'break on subtree modifications' debug option to catch it step by step) Appears that the modal contents are added to the DOM, then removed, then added and displayed properly, causing a flash (our pages don't scroll much so we see the modal content appear briefly) ty @philBrown for interim fix! |
as well as the flash of the un-compiled template, the modal should be appended to the body/appendTo element, not prepended as is currently the case. |
@philBrown Thanks for the solution mate 👍 |
I was experiencing the same issue. Extra Kudos to @philBrown as his work-around fixed it for me too. |
The fix from @philBrown has no effect for me. Has anyone else had trouble getting it to work? |
@Craig1f I was able to get it to work by adding an element at the bottom of my body and then using the appendTo option of the open method. |
I have no idea why nothing I try has worked. I tried the appendTo also. This gets me what I need: The backdrop still kind of flickers, but the modal itself no longer flickers at the end, so it's less irritating. It'll do for now. |
@Craig1f Originally the appendTo wasn't working for me, so not sure if you ran into this as well or not but appendTo works with angular's $document.find function from jqLite which only works on element tags. This is what worked for me: appendTo: $document.find('add-modal') and in the modal template I have an empty element at the bottom of the body: |
philBrown's work around works for me too. Thanks. |
@philBrown's workaround worked for me. |
@philBrown thanks mate |
@philBrown, you genius! |
@philBrown, 2 words : Thanks You ! |
In my case it shifts to the right, so I just added: body.modal-open { |
is there any official fix for this ? my whole app looks bad due to this |
still required @philBrown's CSS fix in late 2018 |
reproducible on demo: http://angular-ui.github.io/bootstrap/#/modal
issue 1:
open modal and pay attention to the page in the background. notice it shifts down briefly before returning to normal.
issue 2:
turn off animation. open a large or small modal and pay attention to how the modal content area displays as its opened. notice it shrinks or expands before displaying as expected.
The text was updated successfully, but these errors were encountered: