angular / angular/components

bug(MatTabs): Touch Delayed on Mobile

Đang mở
#31,488 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: material/tabs P3
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với component MatTabs trên trang tổng quan về tài liệu Material và tái hiện tương tác cảm ứng trong chế độ mô phỏng di động của Chrome và Safari trên iPad OS. So sánh độ trễ khi chuyển bằng cảm ứng và bằng chuột, sau đó xác định entry point của MatTabs chịu trách nhiệm cho độ trễ. Công việc được xem là hoàn tất khi thao tác chuyển bằng cảm ứng bắt đầu với khả năng phản hồi giống như thao tác chuyển bằng chuột và hành vi này được bao phủ bởi một bài kiểm thử có thể tái hiện.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.