-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[MdTab] underline misplaced when "fixed" alignment is changed after initial render #1432
Comments
`setIndicatorStyles` on `transitionend` for correct position while alignment changed fix #1432
Hmmm, i'm still able to trigger this in a slightly more convoluted way. I've made a new codepen at https://codepen.io/zevdg/pen/ZrGVYg If you resize the window down to exactly 600 pixels or less and then maximize the window, you'll see the underline get out of sync again. More generally, if you resize the window down to exactly 600 pixels or up to exactly 601 pixels, you'll see the strange behavior where the underline doesn't match the tab alignment. If you continue resizing, the underline will "catch up" with the tab alignment on the next fire of the resize event. This makes this bug relatively hard to trigger with manual drag/drop resizes, but fairly easy to trigger with instantaneous window events maximizing or rotating a device screen. It's very possible that I'm doing something stupid in the way I'm setting up the resize event listener, so please double check my code and let me know if that is the case. Wanting fixed alignment tabs at mobile widths and non-fixed at tablet/desktop widths seems like a pretty common use case, so if there's a weird trick to setting this up correctly, then maybe it should be added to the docs |
Steps to reproduce
switch the value of md-alignment on an md-tabs after the initial render between "fixed" and any other value. (e.g. fixed for mobile widths and centered for larger screens).
Which browser?
vue@latest
[email protected]
at least chrome and chrome for android
What is expected?
the tab underlines should line up with the tabs
What is actually happening?
The underline is not the right width or in the right location.
Reproduction Link
https://codepen.io/zevdg/pen/XzOWma
The text was updated successfully, but these errors were encountered: