Menu briefly flashes at top-left corner before opening at correct position
維護者通常 3 天內回覆
@BogiKay 已經在處理了。
開始於 2026年3月9日。
評估
這個 Issue 還沒有評估資料。
描述
Current behaviour
When using the Menu component from React Native Paper, a visual glitch occurs:
Whenever the menu is opened dynamically using coordinates (e.g., anchor={{ x, y }}), a semi-transparent duplicate of the menu briefly flashes at the top-left corner of the screen (position (0, 0)) before rendering at the correct anchor position.
This issue happens consistently when opening menus that are positioned using touch event coordinates or dynamic measurement values inside a list (FlatList).
Preview
https://github.com/user-attachments/assets/7b9f5b7a-fcfe-4947-b622-16afd988dd20
Expected behaviour
The Menu should appear only at the specified anchor position immediately upon opening.
There should be no flicker, flash, or duplicate menu rendered at (0, 0).
Actual behaviour
-
When tapping a menu trigger (IconButton), the menu opens correctly at the desired position.
-
However, just before that, a brief flash of the menu appears at the top-left corner of the screen.
-
The flicker looks like a low-opacity duplicate and disappears within a fraction of a second.
How to reproduce?
- Render a list of items (e.g., with FlatList).
- For each item, display a trigger button to open a Menu.
- Use dynamic touch coordinates or measurements to position the menu
const handleOpenMenu = (e) => { const { pageX, pageY } = e.nativeEvent; setMenuPos({ x: pageX, y: pageY }); setMenuVisible(true); } - Open the menu.
- Observe a quick flash at the top-left corner before the menu displays correctly.
Code Snippet
minimal reproduce example
`<Menu
visible={menuVisible}
onDismiss={() => setMenuVisible(false)}
anchor={{ x: menuPos.x, y: menuPos.y }}
<Menu.Item onPress={() => {}} title="Edit Item" />
<Menu.Item onPress={() => {}} title="Delete Item" />
- 主要語言
- TypeScript
- 星號
- 14.5k
- 分支
- 2.3k
- 平均合併
- 8 天 7 小時
- 30 天內合併 PR
- 5
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
callstack/react-native-paper 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
callstack/react-native-paper#5146 · 2 則留言 ·
維護者通常 3 天內回覆
-
Menu ignores the keyboard when it mounts while the keyboard is already open可能已有人在做 @manchoudhary 於 49 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
callstack/react-native-paper#5096 ·
維護者通常 3 天內回覆
-
Tooltip: onPress event object is not propagated to parent component on native可能已有人在做 @aliyilmaztech 於 82 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 74/100
callstack/react-native-paper#5003 ·
維護者通常 3 天內回覆
-
Snackbar stays mounted after `visible=false` under new architecture (iOS + Android)可能重新可做 關聯的 PR 已關閉且未合併。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
callstack/react-native-paper#4951 ·
維護者通常 3 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 68/100
callstack/react-native-paper#4881 ·
維護者通常 3 天內回覆
查看 callstack/react-native-paper 的全部 Issue
相似的 Issue
-
Remove unused dependencies可能已有人在做 @alastair-smith 今天認領。 未關閉chore other
難度 2/5 1-3 小時 新手友好度 78/100
alastair-smith/card-games#384 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
code-yeongyu/senpi#5571 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
nexu-io/open-design#9262 · 1 則留言 ·
維護者通常 1 天內回覆
-
friction
難度 2/5 1-3 小時 新手友好度 72/100
kentcdodds/kody#4753 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難度 1/5 1 小時以內 新手友好度 62/100
lingdojo/kana-dojo#33508 · 1 則留言 · 5 個 reaction ·
維護者通常 1 天內回覆