Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Fix tabs briefly animating too wide after finishing closing some tabs (ver. 2) #12719

Merged
merged 1 commit into from
Mar 2, 2018

Conversation

petemill
Copy link
Member

This PR replaces #12567 (and contains the revert from #12718)

Fix #12566

Since each tab's 'fixed width' was being removed at the same time, each one was measuring the width whilst other tab(s) were / were not reset back to a fluid width, causing measurements to be off.
Flex supports transitions / animations by default, so we do not need to measure the element ourselves in this case, anyway.
Also prevents pinned tabs from fixing tab width and prevents fixing tab width when tab page remains full.

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@petemill petemill added this to the 0.22.x (Nightly Channel) milestone Jan 19, 2018
@petemill petemill self-assigned this Jan 19, 2018
@petemill petemill changed the title Fix tabs briefly animating too wide after finishing closing some tabs Fix tabs briefly animating too wide after finishing closing some tabs (ver. 2) Jan 19, 2018
… or when multiple tab pages exist

Fix #12566

Since each tab's 'fixed width' was being removed at the same time, each one was measuring the width whilst other tab(s) were / were not reset back to a fluid width, causing measurements to be off.
Flex supports transitions / animations by default, so we do not need to measure the element ourselves in this case, anyway.
Also prevents pinned tabs from fixing tab width and prevents fixing tab width when tab page remains full.
@bbondy bbondy modified the milestones: 0.22.x (Developer Channel), 0.23.x (Nightly Channel) Feb 25, 2018
Copy link
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

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

++

@cezaraugusto cezaraugusto merged commit ab32f5e into master Mar 2, 2018
@cezaraugusto cezaraugusto deleted the fix/tabs-animate-too-wide branch March 2, 2018 06:41
petemill added a commit that referenced this pull request Jun 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Closing fixed-width tabs and then moving mouse away animates tabs past bounds of tab-bar
3 participants