callstack / callstack/react-native-paper

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

オープン
#4,907 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る
bug
主要言語
TypeScript
スター
14.5k
フォーク
2.2k
平均マージ
5日 23時間
マージ済み PR(30日)
12

説明

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

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

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

評価

この issue はまだ評価されていません。

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

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