material icon indicating copy to clipboard operation
material copied to clipboard

md-tabs last tab is invisible

Open mramanauskas opened this issue 10 years ago • 11 comments

Problem is caused because of 1px tabs width calculation mistake, which depends on strings used for tabs labels.

Here is codepen where first md-tabs component last tab is out of visible space and second md-tabs component all good. http://codepen.io/rmarius/pen/PZdYmw

Tested issue visible on OS: Linux Browser: Chrome 47, 48

mramanauskas avatar Feb 03 '16 09:02 mramanauskas

Not an issue.

ThomasBurleson avatar Feb 06 '16 12:02 ThomasBurleson

Issue exists and is visible on specified options.

mramanauskas avatar Feb 08 '16 06:02 mramanauskas

Have the same situation. Third Tab and the last one "Text" is not visible. But if I use "Textt" everything is OK

vladimir-barsuchenko avatar Feb 11 '16 12:02 vladimir-barsuchenko

Explanation for "Not an issue." is needed or reopen issue?

mramanauskas avatar Feb 12 '16 06:02 mramanauskas

I had the same issue, it happens only when a specific combinations of text is used in the tabs. Fixed it by adding " " spaces at the beginning and end of each label. It won't effect the size! :D

@levgaas @mramanauskas

toonvanstrijp avatar Jan 11 '17 18:01 toonvanstrijp

I fixed it by adding ng-cloak to the parent element of md-tabs

@ToonvanStrijp @mramanauskas

vladimir-barsuchenko avatar Jan 12 '17 15:01 vladimir-barsuchenko

@levgaas It doesn't work :/

This is my code:

<md-dialog flex="60"  aria-label="User dialog">
        <md-toolbar>
            <div class="md-toolbar-tools">
                <h2>Add scan</h2>
                <span flex></span>
                <md-button ng-disabled="isLoading" ng-show="selectedIndex > 0" class="md-icon-button" ng-click="addOrEdit()">
                    <md-icon class="material-icons">add</md-icon>
                </md-button>
                <md-button ng-disabled="isLoading" class="md-icon-button" ng-click="cancel()">
                    <md-icon class="material-icons">close</md-icon>
                </md-button>
            </div>
        </md-toolbar>
        <md-dialog-content>
            <md-progress-linear ng-show="isLoading" ng-disabled="!isLoading" md-mode="indeterminate"></md-progress-linear>
            <md-tabs md-dynamic-height md-border-bottom md-selected="selectedIndex">
                <md-tab ng-cloak  label="{{'GENERAL' | translate}}">
                    <md-content class="md-padding">
                        <form name="scanForm" ng-submit="submitScan()">
                            <md-input-container class="md-block">
                                <label>{{'TITLE' | translate}}</label>
                                <input ng-disabled="isLoading" ng-required="true" type="text" name="title" multi-lang-edit multi-lang-model="scan.title">
                                <div ng-messages="scanForm.title.$error">
                                    <div ng-message="required">{{'INPUT_REQUIRED' | translate}}</div>
                                </div>
                            </md-input-container>
                        </form>
                    </md-content>
                </md-tab>
                <md-tab label="{{'STYLES_ROLES' | translate}}">
                    <md-content class="md-padding">
                        <md-table-container>
                            <table md-table multiple>
                                <thead md-head>
                                <tr md-row>
                                    <th md-column>{{"CATEGORY" | translate}}</th>
                                    <th md-column>{{"ACTION" | translate}}</th>
                                </tr>
                                </thead>
                                <tbody md-body>
                                <tr md-row md-auto-select ng-repeat="category in scan.categories track by $index">
                                    <td md-cell>
                                        {{category | multiLang}}
                                    </td>
                                    <td md-cell>
                                        <md-button class="md-icon-button" data-ng-click="addOrEdit(category)" aria-label="Edit">
                                            <md-icon aria-label="Edit" class="material-icons">edit</md-icon>
                                        </md-button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </md-table-container>
                    </md-content>
                </md-tab>
                <md-tab ng-disabled="!scan.categories.length > 0" label="{{'QUESTIONS' | translate}}">
                    <md-content class="md-padding">
                        <md-table-container>
                            <table md-table multiple>
                                <thead md-head>
                                <tr md-row>
                                    <th md-column>{{"QUESTION" | translate}}</th>
                                    <th md-column>{{"ACTION" | translate}}</th>
                                </tr>
                                </thead>
                                <tbody md-body>
                                <tr md-row md-auto-select ng-repeat="question in scan.questions track by $index">
                                    <td md-cell>
                                        {{question.question | multiLang}}
                                    </td>
                                    <td md-cell>
                                        <md-button class="md-icon-button" data-ng-click="addOrEdit(question)" aria-label="Edit">
                                            <md-icon aria-label="Edit" class="material-icons">edit</md-icon>
                                        </md-button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </md-table-container>
                    </md-content>
                </md-tab>
            </md-tabs>
        </md-dialog-content>
        <md-dialog-actions>
            <md-button ng-disabled="isLoading" type="submit" data-ng-click="submitScan();" class="md-primary">{{'SAVE' | translate}}</md-button>
        </md-dialog-actions>
</md-dialog>

toonvanstrijp avatar Jan 29 '17 12:01 toonvanstrijp

you can use following CSS code

md-pagination-wrapper{ width:500px !important; }

jeevaarulanandam avatar Jan 31 '17 07:01 jeevaarulanandam

Had same issue transform: translate3d(0px, 0px, 0px) applied on md-pagination-wrapper was causing problem
Tried removing that, worked like charm.

sandeshdamkondwar avatar Jul 27 '17 08:07 sandeshdamkondwar

@sandeshdamkondwar removing the transform didn't work, @jeevaarulanandam I don't want to set a fixed width, since I'm working with multiple languages and the size is different on each language. @mramanauskas said that the reason was a 1px calculation issue, what I did to fix it was:

.md-tab{
  margin-left: -1px;
}

I'm positive that this will fix it for all of you?

toonvanstrijp avatar Jul 27 '17 22:07 toonvanstrijp

.md-tab{ margin-left: -1px; } @ToonvanStrijp yhup! that fixed it for me

gidkom avatar Aug 02 '17 15:08 gidkom