-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modal not showing when used with Bootstrap V4 #280
Comments
I can confirm the issue and the workaround. With Boostrap 4.0.0-alpha.6, calling the |
Can someone post a plunker for this? |
I can confirm that the same issue occurs, however I had to include important tags in order to override the default css. Here's the revised version.
|
@dimejy2 code works well, but there is some delay on background fading when closing the modal. is there any way to fix that? |
This is working well for the time being, but this should be included in the actual package itself? Is someone working on creating a pull-request? @jsnkelvin Agreed after testing there is a slight delay with the css on the fade. |
@shlomiassaf here is a plunker showing the problem: http://plnkr.co/edit/b44cBG0LdXTS7jMlXsfA. I suspect this issue is related to #217. The delay noted in this ticket appears to be caused by the animation effect callback never being triggered as described in the other ticket; this also causes the modal-open class to be "stuck" on the As a workaround for the delay, you can comment out a few lines in modal.js and it works (albeit without animation):
Edit: use code tags and add workaround |
Hi @dan-nawrocki @dimejy2 @ravtakhar @jsnkelvin @nbckr I see one small bug with the code. I implemented it using custom css. I have no problem with animation. Problem : For Demo I created from same plunker open dialog and scrollbar will gone. Please help me with this. |
@shabbir-dhangot the |
OK @jsnkelvin @shabbir-dhangot: I managed to get rid of the delay given the hint from my workaround. The
And a plunker: http://plnkr.co/edit/b44cBG0LdXTS7jMlXsfA @shlomiassaf, it looks like the only changes for bootstrap 4 (alpha 6 at least) is to update any instances of the |
None of the bootstrap4-alpha6 CSS fixes above work for me. I put them app.component.css, didn't fix. I have to install bootstrap3.3.7 to get the modal working. Why? |
Ok if you put the CSS above in the base styles.css, it almost works. Modal shows, but background does not dim. |
I can confirm this issue for Bootstrap 4 alpha 6, but we didn't have it for alpha 4. |
@maksim-marholin @locohost use modal by ng bootstrap. Its working fine for me. https://ng-bootstrap.github.io/#/components/modal |
@shabbir-dhangot we're using Angular2-modal as it allows you to create modals from TypeScript with fluent API. That's not possible with ng-bootstrap's version. |
Did you add this to your HTML?
Thats currently required for v4 |
Works for me. To get the original workaround working (I copied the CSS into my app.component.css) I needed to disable ViewEncapsulation in app.component.ts. See "Disable CSS Encapsulation" at https://coryrylan.com/blog/css-encapsulation-with-angular-components for how to do this. |
please . i am a beginner in web coding , i have the same problem Modal not showing when used with Bootstrap V4,,, i saw the code of styles that you share and some people say it works , but actually i don't know where to past it in my code , should it be inside <style></style>, thanks in advance |
Indeed both works for me. But why can't I find any references to the theme in the bootstrap 4 website? If it is required it should be said clearly.
Btw, adding this, what are exactly doing? Thank you |
Thanks to @dan-nawrocki |
Works for me, I had a problem cause I made a port of a proyect than I'm working with pure bootstrap 4, and need to do some changes on the versions... Thank you so much in advance, regards. |
@nbckr Thanks mate. |
Thanks @nbckr. |
Also experiencing this issue: The workaround does seem to fix this confict. mabe fade should be something not some widespread... it sort of curtains...
|
@JoshuaCaputo Yes, But there is nothing to do with curtain. Even if you remove class (curtain), the modal will appear. If we use the given modal examples in Bootstrap 4, it works. But when we use the modal examples for Bootstrao 4.1.3, it doesn't works. Please raise a ticket for this issue. |
Having same problem with 4.1.3 version. NgbModal windows won't show. Need to use bootstrap 4.0.0-alpha.6 for it to work. |
I have this working with Bootstrap 4.3.1
.fade.in { .modal.in .modal-dialog { .modal-backdrop .fade .in { .modal-backdrop.fade {
This is very similar to what you see above BUT the "!important" attribute has been added to some of the items. |
Thanks for the headsup @nielsboecker as this is also unsurprisingly a problem with bootstrap 3 framework.. to get modal to show use following scss based on Niels' post:
.. and rather use component to open modal as the templateRef doesn't seem to work.. come on ngx-bootstrap developers you claim your ngx framework is re bootstrap backwards compatible :-) |
I spent some time wondering why the modal would not show on screen, now I found out and I want to share my insights in case anyone has the same problem.
The reason was a breaking change in Bootstrap 4.0.0-alpha.6. In earlier Versions, class="fade in" on the modal caused it to a) be hidden and b) smoothly appear. It seems that the "in" class has now been renamed to "show". angular2-modal gives its element the classes "fade in" however, so they just disappear.
Workaround
Override styles:
The text was updated successfully, but these errors were encountered: