Open ChildishGiant opened 6 years ago
Could you make a codepen reproducing the problem? It might have to do with the timing of the select(). Have you tried preselecting a tab instead?
It seems to have gone since I've been in active development. I've tried making a codepen but I can't reproduce it again. Sorry about that.
I've just been having the same issue.
I don't have time to create a fiddle which can demonstrate the issue but I'm appending the whole HTML block that has the tabs to another element - which I suspect might be the issue as it could be that the indicator position is being calculated before I move my elements.
Calling tabs.updateTabIndicator();
or resizing the window fixes the issue along with clicking on the tabs though.
this is my solution:
jQuery(document).ready(function(){
jQuery('.tabs').tabs();
});
window.addEventListener('orientationchange', function() {
setTimeout(function(){
jQuery('.tabs').tabs('updateTabIndicator');
},10)
});
I have had the same problem and was able to fix it with this CSS:
::-webkit-scrollbar {display: none;}
I solved this problem hiding the indicator and styling the active tab with a bottom border instead:
/* CSS */
.tabs .indicator {
display: none;
}
.tab a.active {
border-bottom: 2px solid;
border-color: #f6b2b5;
}
The button is clicked programmatically using
select()
on loading, just after initialisation. The selection is correct but the indicator is off. If I then useupdateTabIndicator()
, the indicator moves but not to the right place, as it would if the tab was click.Here's the indicator on loading
Here it is once updateTabIndicator() is called
https://gfycat.com/HollowFailingAntelopegroundsquirrel