Menu briefly flashes at top-left corner before opening at correct position

オープン
#4,827 コメント 1 件 リアクション 8 件 担当者 1 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@BogiKay がすでに取り組んでいます。

2026年3月9日 から。

評価

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

説明

bug
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
  1. When tapping a menu trigger (IconButton), the menu opens correctly at the desired position.

  2. However, just before that, a brief flash of the menu appears at the top-left corner of the screen.

  3. The flicker looks like a low-opacity duplicate and disappears within a fraction of a second.

How to reproduce?
  1. Render a list of items (e.g., with FlatList).
  2. For each item, display a trigger button to open a Menu.
  3. 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); }
  4. Open the menu.
  5. 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時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstack/react-native-paper のほかの issue

callstack/react-native-paper の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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