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
-
needs-triage
难度 2/5 1-3 小时 新手友好度 66/100
microsoft/playwright#43875 · 1 条评论 ·
维护者通常 1 天内回复
-
feature
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1 小时以内 新手友好度 88/100
adobe/react-spectrum#10909 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
Run the dependency drift check可能已有人在做 @spaceninja 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 72/100
cloudfour/lighthouse-parade#449 ·
维护者通常 1 天内回复