Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

tabs: wrong tab position when a new tab is added #11689

Closed

Description

@Axeldorf

Bug, enhancement request, or proposal:

There is an error with tabs position when you add a new tab and it does not fit and needs to be horizontally scrolled.

CodePen and steps to reproduce the issue:

CodePen Demo which demonstrates the issue:

Detailed Reproduction Steps:

  1. Go to https://material.angularjs.org/HEAD/demo/tabs
  2. Go to "Dyanmic tabs" block.
  3. Add a new tab with any label and any content.

What is the expected behavior?

A new tab is created and tabs are scrolled to it. Then you can go back with the left arrow until first tab.

What is the current behavior?

A new tab is created and tabs are scrolled to it. You cannot see any tab until you click on left arrow, then you see some tabs and you cannot go to previous tabs.

What is the use-case or motivation for changing an existing behavior?

I want to create new tabs dynamically and I want to be able to go to first tab.

Which versions of AngularJS, Material, OS, and browsers are affected?

  • AngularJS: 1.7.5
  • AngularJS Material: 1.1.14
  • OS: Ubuntu 18.04
  • Browsers: Chome v72.0.3626.119

Is there anything else we should know? Stack Traces, Screenshots, etc.

This bug occurs since AngularJS Material v1.1.11, with v1.1.10 it is working correctly.

Activity

  1. added
    severity: regression
    P1: urgent
    on Mar 28, 2019
  2. self-assigned this
    on Mar 28, 2019
  3. added this to the 1.1.15 milestone on Mar 28, 2019
  4. added
    needs: investigation
    on Mar 28, 2019
  5. Splaktar commented on Mar 28, 2019

    @Splaktar
    Contributor

    Thank you for this report! We'll work on a fix for this ASAP!

  6. modified the milestones: 1.1.15, 1.1.16 on Mar 29, 2019
  7. modified the milestones: 1.1.18, 1.1.19 on Apr 6, 2019
  8. Splaktar commented on Apr 19, 2019

    @Splaktar
    Contributor

    This is caused by this line in 1.1.11

    width: 999999px;

    and this block in 1.1.12

    // Work around width calculation issues on IE11 when pagination is enabled
    if (shouldPaginate) {
    getElements().paging.style.width = '999999px';
    } else {
    getElements().paging.style.width = undefined;
    }

  9. Splaktar commented on Apr 19, 2019

    @Splaktar
    Contributor

    These are both (PR #11432 and PR #11567) a result of the need to fix this regression in IE with pagination.

    We had better fixes that didn't use 999999px in PR #11432, but they caused too many problems in the Google presubmits. So we had to fall back to this solution.

  10. added a commit that references this issue on Apr 19, 2019
    bf00756
  11. changed the title [-]dynamic tabs: wrong tab position when a new tab is added[/-] [+]tabs: wrong tab position when a new tab is added[/+] on Apr 19, 2019
  12. added a commit that references this issue on Apr 19, 2019
    f2dbe07
  13. Splaktar commented on Apr 19, 2019

    @Splaktar
    Contributor

    OK, f2dbe07 will fix this for browsers other than IE11. IE11 still needs this 999999px hack to make pagination usable (avoid all labels being truncated to 1 character and ...).

    • Investigate how to fix/disable animations on IE11 while keeping pagination working
  14. added
    has: Pull Request
    and removed
    needs: investigation
    on Apr 19, 2019
  15. added a commit that references this issue on Apr 23, 2019
    1063a92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1: urgenthas: Pull Requestresolution: fixedseverity: regressiontype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions