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

fix(tabs): fixes tab math to address issues when used within dialog #7118

Closed
wants to merge 1 commit into from
Closed

fix(tabs): fixes tab math to address issues when used within dialog #7118

wants to merge 1 commit into from

Conversation

robertmesserle
Copy link
Contributor

closes #7048

@robertmesserle
Copy link
Contributor Author

@ThomasBurleson @jelbourn

// prevents `offsetWidth` value from being rounded down and causing wrapping issues, but
// also handles scenarios where `getBoundingClientRect()` is inaccurate (ie. tabs inside
// of a dialog)
width += Math.max(element.offsetWidth, element.getBoundingClientRect().width);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you able to write a unit test that fails without this fix but passes with it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt it, it's one of those bugs that only sometimes shows up, but I could give it a shot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it may be doable with this particular one, I think this is more consistent than the other issues related to these calculations.

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

Successfully merging this pull request may close these issues.

md-dialog: Tab dialog not showing all tabs before clicking on tab one
2 participants