When activating the modal backdrop, for a fraction of a second the background gets dark without fade effect. Then it gets back to transparent and only after that a fade effect is triggered.
Tested in Chrome, Firefox and Edge. The Problem does not occur with Bootstrap only modal.
You can compare this on both demo pages:
I asked about that too in the gitter channel, but got no answers. It seems to me that instead of the background's element opacity starting at 0 and move gradually to somewhere near 50%, it starts at 100% and then moves down, or something.
I can confirm this, but I can't see where this is coming from. Perhaps @valorkin can help.
to be honest I was fighting a bit with it,
what I can say and do to fix it:
I am waiting for ng2-animate and try it
Can @valorkin post the said ugly code, so we can patch our page until you are able to actually close this issue.
OK, can I do it nearest Monday?
I am planning to release new datepicker with pop up version
@valorkin @KimBum I've fixed this with css.
@BenevidesLecontes Nice to hear. Could you please share the solution with all of us?
@MaximilianWiedemann here's my css with animation
.modal-backdrop{
transition-duration: 0.4s;
background: rgba(55, 58, 71, 0.9);
transition: opacity 0.3s;
}
.modal-backdrop.in{
opacity: 1;
}
.modal .modal-content{
-webkit-animation-duration: 0.4s;
animation-duration: 0.4s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
border-radius: 0;
}
.modal.fade.in .modal-content{
-webkit-animation-name: anim-open;
animation-name: anim-open;
-webkit-animation-timing-function: cubic-bezier(0.6,0,0.4,1);
animation-timing-function: cubic-bezier(0.6,0,0.4,1);
}
.modal.fade .modal-content{
-webkit-animation-name: anim-close;
animation-name: anim-close;
}
@-webkit-keyframes anim-open {
0% { opacity: 0; -webkit-transform: scale3d(0, 0, 1); }
100% { opacity: 1; -webkit-transform: scale3d(1, 1, 1); }
}
@keyframes anim-open {
0% { opacity: 0; -webkit-transform: scale3d(0, 0, 1); transform: scale3d(0, 0, 1); }
100% { opacity: 1; -webkit-transform: scale3d(1, 1, 1); transform: scale3d(1, 1, 1); }
}
@-webkit-keyframes anim-close {
0% { opacity: 1; }
100% { opacity: 0; -webkit-transform: scale3d(0.5, 0.5, 1); }
}
@keyframes anim-close {
0% { opacity: 1; }
100% { opacity: 0; -webkit-transform: scale3d(0.5, 0.5, 1); transform: scale3d(0.5, 0.5, 1); }
}
@BenevidesLecontes This only fixes the issue partially because now you're missing the fade in animation. The backdrop now appears instantly. It's way better than before, however it's not fixed completely.
@MaximilianWiedemann try to change the animations duration.
@BenevidesLecontes That CSS fix is very close, but as @MaximilianWiedemann points out, there is no fade in animation at all, alerting the animation durations don't seem to have an effect. Will try work out CSS that is a complete workaround.
Guys ugly fix deployed to http://valor-software.com/ng2-bootstrap/#/modals
please test, if it is fine for now
I will publish this version
@valorkin as ugly fixes go, that's a good one. Thanks very much.
@valorkin Works for me. :+1:
awesome, publishing
published
use https://www.hamsterpad.com/chat/ng2 to get in touch
Most helpful comment
Guys ugly fix deployed to http://valor-software.com/ng2-bootstrap/#/modals
please test, if it is fine for now
I will publish this version