callstack / callstack/react-native-paper

[Web] Menu anchor inside lists causes aggressive auto-scroll and focus hijacking on mount

Đang mở
#4,907 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
TypeScript
Star
14.5k
Fork
2.2k
Merge trung bình
5 ngày 23 giờ
Pull request đã merge (30 ngày)
12

Mô tả

### Current behaviour
When wrapping list items (inside FlatList, Shopify FlashList or ScrollView) with the Menu component as an anchor, the component aggressively steals DOM focus upon mounting on the Web platform. In asynchronous lists, this causes the browser to forcefully auto-scroll down to the newly rendered items and displays the native blue focus ring.

### Expected behaviour
The Menu anchor should remain entirely passive upon mounting and should not steal DOM focus unless explicitly interacted with by the user. The list's scroll position should remain completely stable.

### How to reproduce?
https://snack.expo.dev/@szado/smiling-yellow-cookie?platform=web

### Preview

https://github.com/user-attachments/assets/02567f5b-15a0-44a4-a633-af85836a2e41

### Your Environment

| software | version
| --------------------- | -------
| react-native | 0.83.6
| react-native-paper | 5.15.1
| expo sdk | 55

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

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

Đánh giá

Issue này chưa được đánh giá.

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.