-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
Unnecessary delay before fading-in new tab pane - tab.js #26525
Comments
This is a huge problem for ie11 and edge. The page containing say 4 tabs loads with the first one active and shown, but when we click on the second or third tab the inspector shows the |
@thinkstudeo Your mentioned issue is not strictly related to this one, but yours seems to be fixed in the latest stable 4.1.0, assuming you're still using 4.0.0 or older. Have a check! :) |
@Djules Thanks for the tip. I was infact using 4.0.0 , I upgraded it to 4.1.0 , however the problem remains. I don't know why? |
In 4.0.0 : https://codepen.io/Johann-S/pen/LmgVKL?editors=1010#0 I don't see a difference 😟 |
@Johann-S There is no difference indeed, still the issue is there, don't you see the 150ms delay when switching tab, before the new tab pane shows up? If you increase the transition-duration value for the fade effect, the delay increases obviously (since 4.1.0). Here is a fork of the 4.1.1 demo with a fix : https://codepen.io/Djules/pen/ELdPer I'm going to give a PR about that. |
yep but that's the behavior we had since the beginning 🤔 and that's why we added the ability to change that value with CSS or to simply remove |
I made a quick demo with Bootstrap 3.3.7 : https://codepen.io/Djules/pen/ELdKPq As you can see, there were no delay when switching tabs; current one fade-out then new one fade-in. |
That's strange 🤔 because that's the same in v3 (https://github.com/twbs/bootstrap/blob/v3.4.0-dev/js/tab.js#L108) |
The next line is the one which actually fade-out the active tab: https://github.com/twbs/bootstrap/blob/v3.4.0-dev/js/tab.js#L111 There is no such line in v4, this is the fix I made in the 4.1.1 demo above. |
I saw you removed |
I agree, but what triggers this transition ? There is no class added or removed to the active tab before the callback, so there is no It's pretty clear for me where the issue comes from but it doesn't seem for your… By the way, thanks for your time involved. |
Ok I understand, I made a CodePen which demonstrate what you explained see: https://codepen.io/Johann-S/pen/jxeRoa?editors=1010#0 Open the console and you'll see a warning which said: BTW it was better in Beta 2 than now see: https://codepen.io/Johann-S/pen/qYJGrE?editors=1010 |
@Johann-S: is this still valid? |
Yep still valid |
Using version 4.1.0, I found out a delay before new tab pane is shown with JS behavior and fade effect.
This delay is the transition-duration value of the fade utility class.
Issue comes from the
_activate
method, line 144 in tab.js file.There is a listener added to the previously activated tab pane for the
transitionend
event, but no classes are added to this element after that, so only the emulator can triggers the callback which activates the new one.Have a look at the demo in the official doc.
The text was updated successfully, but these errors were encountered: