You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Hello,
Look like the problem is still here. I use dialog with tab. Every time I call the dialog, the last tab is not displayed.
I find two quickfix:
Add a dummy tab
Or fire this on the modalController to add 1px (ugly).
setTimeout(() => {
var el = document.querySelector('md-pagination-wrapper');
var currW = el.style.width;
el.style.width = parseInt(currW, 10) + 1 + 'px';
}, 200);
I reproduce the issue on this codepen. I'm using the last version of chrome on linux.
Reacted by Jack Forbes, Saumya Suhagiya, manish2535, jiffify and Joshua Russo
I started having this problem after upgrading to v1.1.0 and two solutions worked for me:
Explicitly set a tab width, so that the wrapper doesn't render too small. Just add your myTabs class to the <md-tabs> element and then the following CSS:
.myTabs.md-tab{width:150px;}
Set the tabs to always stretch with md-stretch-tabs="always" although this obviously isn't an ideal solution for everyone. Also I have found that setting stretch to always does not paginate properly on mobile...
I have the same problem using latest 1.1.1. I am using tabs in custom dialogs, and the last tab is never displayed. The workaround using md-stretch-tabs="always" works for me but it is not ideal.
Reacted by manish2535, Sunny, Joshua Russo and PARTH KHANDELWAL
I'm seeing this problem in Chrome and Firefox but not IE 11 and Edge. My scenario uses just 2 static tabs and both the extra hidden tab and setting md-stretch-tabs="always" work but are ugly fixes.
For anyone who isn't shy about using full jQuery here's a drop in patch
(function () {
'use strict';
// Patch for md-tab bug https://github.com/angular/material/issues/6212
var initialWidth = {};
$('body').on('DOMNodeInserted', 'md-pagination-wrapper', function (e) {
var that = this;
setTimeout(function() {
// Don't increment the width if there's no width set
if (that.style.width === "" || that.style.width == "0px")
return;
var currW = parseInt(that.style.width);
// Don't process a element more than once (the $$hashkey value is added by Angular after all the DOM is created)
if (initialWidth[that.$$hashkey] < currW)
return;
that.style.width = currW + 1 + 'px';
initialWidth[that.$$hashkey] = currW;
}, 200);
});
})();
Removing the width:1px from this class works for me. This gets applied to the hidden tabs which the directive uses to calculate the width of the md-pagination-wrapper, which does not allow custom content width to be taken into consideration.
Activity
[-]md-tabs doesnt always render the last tab with ng-repeat[/-][+]md-tabs last tab sometimes not visible[/+]fix(autocomplete): fixes the sizing math
fix(autocomplete): fixes the sizing math
mrdotb commentedon Aug 3, 2016
Hello,
Look like the problem is still here. I use dialog with tab. Every time I call the dialog, the last tab is not displayed.
I find two quickfix:
Add a dummy tab
Or fire this on the modalController to add 1px (ugly).
I reproduce the issue on this codepen. I'm using the last version of chrome on linux.
JackForbes commentedon Aug 22, 2016
I started having this problem after upgrading to v1.1.0 and two solutions worked for me:
myTabsclass to the<md-tabs>element and then the following CSS:md-stretch-tabs="always"although this obviously isn't an ideal solution for everyone. Also I have found that setting stretch to always does not paginate properly on mobile...JackForbes commentedon Aug 22, 2016
Also not sure how I just unassigned @robertmesserle ...
ErisedMedia commentedon Aug 22, 2016
Seems to happen at random after upgrade to 1.1.0
So far only in firefox. Never in chrome.
hexadecy commentedon Aug 26, 2016
AM 1.1.0
Dialog + dynamic tabs
Issue: cannot see and/or scroll to the last tab.
Because: The label is not a static text.
Just add
as a workaround.jaczynski commentedon Sep 9, 2016
I have the same problem using latest 1.1.1. I am using tabs in custom dialogs, and the last tab is never displayed. The workaround using md-stretch-tabs="always" works for me but it is not ideal.
hexadecy commentedon Sep 10, 2016
Or you can add
<md-tab ng-hide="true"></md-tab>rupe120 commentedon Jan 5, 2017
I'm seeing this problem in Chrome and Firefox but not IE 11 and Edge. My scenario uses just 2 static tabs and both the extra hidden tab and setting md-stretch-tabs="always" work but are ugly fixes.
Please fix
rupe120 commentedon Jan 5, 2017
For anyone who isn't shy about using full jQuery here's a drop in patch
smithscripts commentedon Apr 19, 2017
Removing the width:1px from this class works for me. This gets applied to the hidden tabs which the directive uses to calculate the width of the md-pagination-wrapper, which does not allow custom content width to be taken into consideration.
._md-visually-hidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
text-transform: none;
/width: 1px;/
}
LabN36 commentedon May 22, 2017
@smithscripts you save my life after 2 hours of debugging