angular / angular/components

bug(tab): position sticky is broken inside of tabs

オープン
#28,500 コメント 2 件 リアクション 3 件 担当者 0 名 GitHub で見る
area: material/tabs P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

position sticky doesn't work inside of mat-tabs because they use overflow: hidden;

### Reproduction

StackBlitz link: https://components-issue-kwznw3.stackblitz.io https://stackblitz.com/edit/components-issue-kwznw3?file=src%2Fapp%2Fexample-component.html
Steps to reproduce:
1. scroll down
2. see that the "broken scroll" element inside of the tab doesn't stick, but the same code outside does (see "sticky" right below it)

### Expected Behavior

position sticky should work

### Actual Behavior

position sticky doesn't work

### Environment

- Angular: tried it with 16.2.1 and 17.1.0
- CDK/Material: tried it with 16.2.1 and 17.1.0
- Browser(s): chrome/firefox
- Operating System (e.g. Windows, macOS, Ubuntu): windows

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされた StackBlitz の再現と、参照されている src/app/example-component.html から始め、その後、タブコンテナの overflow の動作が position: sticky にどのような影響を与えるかを調査します。再現で示されているように、タブ内の要素がスクロール中に固定され、通常のタブの動作にリグレッションが発生しなければ、作業は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, css
領域
frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。