Skip to content
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

If the label of a tab changes in paper-tabs, the selectionBar doesn't accommodate that change #183

Open
fejesjoco opened this issue Sep 9, 2016 · 2 comments

Comments

@fejesjoco
Copy link

Description

Set up a paper-tabs, then change the title of a tab.

Expected outcome

The underline follows the changes.

Actual outcome

The underline does not follow the changes.

Live Demo

https://jsbin.com/demupiqiki/edit?html,output
If you change the script to fire immediately instead of a timer, you'll see it looks very differently.

Browsers Affected

Tested Chrome only but probably all of them.

@fejesjoco
Copy link
Author

One way to solve it would be to refactor the underline so that it is placed inside the paper-tab, therefore it will follow DOM changes automatically. Keeping the current architecture, DOM observers are needed to trigger underline resizing when the tabs change.

@fejesjoco
Copy link
Author

There is a much more evil scenario. Paper-tabs uses the roboto font, which is downloaded from some google fonts server. Before a font is downloaded, Chrome can only guess the size of the text. It is possible that paper-tabs is rendered before the font is there, so you can either see that the title is empty or uses some weird default font. And then the font gets downloaded, the text and its size changes in paper-tabs, but the underline doesn't follow that. We're very good at dealing with flakes in our tests but this is a race condition in paper-tabs so it must be fixed at the source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants