Skip to content
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

Right arrow has line break when window resized smaller and on tab change a vertical scroll bar appears #58

Open
fontajos opened this issue Sep 24, 2018 · 4 comments

Comments

@fontajos
Copy link

If the window is been made a bit smaller scrt does a recalculation and places its UI elements at new positions. If one changes the tab now to a tab with larger content, that needs vertical scroll bars of the browser, the right chevron faces a line break and wanders to the left side..

@mikejacobson
Copy link
Owner

Thanks for using my plugin! This is an interesting scenario I hadn't considered. Does this plunk demonstrate the issue:
http://plnkr.co/edit/KrwjVfXyiPiENpA2KeUH?p=preview

Click the "Troublemaker" tab, which has very tall content that triggers a vertical scrollbar.

I want to be sure I understand the issue correctly before attempting a fix. 😃

@danman1234
Copy link

I have the same issue here:

Also i want to hide all the arrows before the loading state is 100 ready.

jQuery('.nav-tabs').scrollingTabs().on('ready.scrtabs', function() {
// jQuery('.tab-content').show();
alert('test');
});

This does NOT work, no alert or other errors

@mikejacobson
Copy link
Owner

@danman1234 can you provide a plunk or something demonstrating your setup? In this plunk from the README:
http://next.plnkr.co/edit/iMJ435SFXjIX18YEM4Z4

the file st-demo.js has a listener on the ready.scrtabs event that fires fine. If you put an alert() in there it will execute. So I'd have to see more of your setup to be able to help.

@mikejacobson
Copy link
Owner

I just published v2.6.0, which should fix the issue of a vertical scrollbar appearing but not triggering the plugin to resize itself (thus causing the right scroll arrow to wrap).

Note that you'll need to pass in option handleDelayedScrollbar: true. I made it an opt-in feature because it requires adding an iframe to the page to listen for the scrollbar's presence, and I didn't want to add that by default to everyone's implementation if it's not necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants