-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-tabs scrolling is incorrectly disabled #6495
Comments
I had the same problem |
I'm not able to reproduce this. Can you provide more information? |
On the Dynamic Tabs demo https://material.angularjs.org/1.0.1/demo/tabs Tested and got same result on Angular Material 1.0.1 demo pages with Google Chrome Version 47.0.2526.106 (64-bit) on both linux and Mac OS X. |
If you have a list of tabs that do not fit on init, the arrows are disabled: http://codepen.io/anon/pen/BjmPYz |
I came across the same issue, I believe the issue is with the following function
since offsetWidth returns an Integer there appears to be rounding errors. replacing with getBoundingClientRect().width seems to fix the issue.
The last tab is overflowing to the next line causing the issue. |
I am seeing the same issue |
Fixed in v1.0.5 via 2390d88 |
Yes, looks like this is fixed in v1.0.5. Thanks! |
I'm using v.1.0.9 this problem still persist. Initially scroller are working fine but when I scroll on tabs scroller are disabled since more items are there to show. Any solution? |
@hani647 please test against 1.1.7 and if you are still seeing an issue then please open a new issue with a CodePen that demonstrates the problem. It would be helpful to know what browser you are seeing this on, etc. |
Hi I'm experiencing this as well. the exact function that uses it is /**
* When pagination is on, this makes sure the selected index is in view.
* @param event
*/
function scroll (event) {
if (!ctrl.shouldPaginate) return;
event.preventDefault();
ctrl.offsetLeft = fixOffset(ctrl.offsetLeft - event.wheelDelta);
} So after an attempt of scrolling the offsetLeft became to be NaN and it breaks the scrolling altogether An easy fix for that is to configure jquery event properties so that it copies it from originalEvent
From docs https://learn.jquery.com/events/event-extensions/#jquery-event-props-array |
md-tabs sometimes disables scrolling although there are more tabs to show.
It is possible to reproduce the issue by adding 3-4 more tabs to the Dynamic Tabs demo. https://material.angularjs.org/1.0.1/demo/tabs
The arrows at the beginning and end are disabled and scrolling with mouse does not work.
It was working correctly in 0.11.0
https://material.angularjs.org/0.11.0/#/demo/material.components.tabs
The text was updated successfully, but these errors were encountered: