bug(MatTabs): Touch Delayed on Mobile
- 主要言語
- 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
With MatTab tab switching, there exists a delay on mobile devices and in the Chrome mobile emulation dev mode. This is 100% reproducible on the standard documentation page: https://material.angular.dev/components/tabs/overview
Users found that our WebApp has a sluggish delay when switching between MatTabs and I thought there was some issue with the way we load our components, but no: It turns out there is an underlying issue with how Mat Tabs are. Demonstrated in this video, there is a delay.
https://github.com/user-attachments/assets/3376d4c4-9f3d-4a1d-ba89-c480e5266231
On chrome, until the tab starts to animate, it takes **~100ms** from the moment of click. But in Mobile Device Emulation mode, you can see that it takes 3 times as long, roughly **~330ms**. This is a bit worse on real iPad hardware, where it take up to **~400ms**, feeling seriously sluggish.
I think this to be a regression, related to https://stackoverflow.com/questions/39902055/web-app-feels-less-responsive-when-added-to-iphones-home-screen
### Reproduction
StackBlitz link:
Steps to reproduce:
1.
2.
### Expected Behavior
The delay when interacting with Mat Tabs should be the same when using touch, as when using the mouse.
### Actual Behavior
There seems to be a 300ms delay, specifically with MatTabs
### Environment
- Angular: 19
- CDK/Material: 19
- Browser(s): Chrome, Safari
- Operating System (e.g. Windows, macOS, Ubuntu): Windows, iPad OS
コントリビューションガイド
調査の方向性
Material ドキュメントの概要ページにある MatTabs コンポーネントから始め、Chrome のモバイルエミュレーションと iPad OS の Safari でタッチ操作を再現します。タッチとマウスでの切り替えのレイテンシを比較し、その後、遅延の原因となっている MatTabs のエントリーポイントを特定します。タッチによる切り替えがマウスによる切り替えと同じ応答性で開始され、その挙動が再現可能なテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100