Skip to content

fix(material/tabs): scroll position lost when tab header is hidden #25855

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

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

crisbeto
Copy link
Member

In #24885 a ResizeObserver was added to the tabs so that the ink bar can re-align if the tab is resized. The problem is that the observer will fire when the tabs become invisible as well, causing the header to re-render using incorrect dimensions.

Fixes #25574.

In angular#24885 a `ResizeObserver` was added to the tabs so that the ink bar can re-align if the tab is resized. The problem is that the observer will fire when the tabs become invisible as well, causing the header to re-render using incorrect dimensions.

Fixes angular#25574.
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Oct 24, 2022
Copy link
Contributor

@wagnermaciel wagnermaciel left a comment

Choose a reason for hiding this comment

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

lgtm

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Oct 24, 2022
@crisbeto crisbeto merged commit c8d8ef2 into angular:main Oct 24, 2022
crisbeto added a commit that referenced this pull request Oct 24, 2022
…25855)

In #24885 a `ResizeObserver` was added to the tabs so that the ink bar can re-align if the tab is resized. The problem is that the observer will fire when the tabs become invisible as well, causing the header to re-render using incorrect dimensions.

Fixes #25574.

(cherry picked from commit c8d8ef2)
crisbeto added a commit that referenced this pull request Oct 24, 2022
…25855)

In #24885 a `ResizeObserver` was added to the tabs so that the ink bar can re-align if the tab is resized. The problem is that the observer will fire when the tabs become invisible as well, causing the header to re-render using incorrect dimensions.

Fixes #25574.

(cherry picked from commit c8d8ef2)
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Oct 28, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@angular/cdk](https://github.com/angular/components) | dependencies | patch | [`14.2.5` -> `14.2.6`](https://renovatebot.com/diffs/npm/@angular%2fcdk/14.2.5/14.2.6) |
| [@angular/material](https://github.com/angular/components) | dependencies | patch | [`14.2.5` -> `14.2.6`](https://renovatebot.com/diffs/npm/@angular%2fmaterial/14.2.5/14.2.6) |

---

### Release Notes

<details>
<summary>angular/components</summary>

### [`v14.2.6`](https://github.com/angular/components/blob/HEAD/CHANGELOG.md#&#8203;1426-quilt-seagull-2022-10-26)

[Compare Source](angular/components@14.2.5...14.2.6)

##### material

| Commit | Type | Description |
| -- | -- | -- |
| [89771dcc4](angular/components@89771dc) | fix | **tabs:** scroll position lost when tab header is hidden ([#&#8203;25855](angular/components#25855)) |

#### Special Thanks

Kristiyan Kostadinov

<!-- CHANGELOG SPLIT MARKER -->

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xLjIiLCJ1cGRhdGVkSW5WZXIiOiIzNC4xLjIifQ==-->

Co-authored-by: cabr2-bot <[email protected]>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1613
Reviewed-by: Epsilon_02 <[email protected]>
Co-authored-by: Calciumdibromid Bot <[email protected]>
Co-committed-by: Calciumdibromid Bot <[email protected]>
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(COMPONENT): mat-tab-group tab looses focus when hidden and then shown
2 participants