Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[v11] Menu: Menu.Portal and Menu.Item with href incompatible

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

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
nextjs, react
領域
frontend

調査の方向性

Issue に示されている Menu.Portal と Menu.Item のエントリーポイントから始め、NextLink を使って提供された TSX の例を再現します。項目に href があり、Menu.Portal を通してレンダリングされる場合のクリック動作を追跡します。Home または About を選択するとメニューが閉じ、期待されるナビゲーションが実行されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Status: Needs Triage
Describe the bug

Description
This is a simplified version of my component:

<Menu>
  <Menu.Trigger>
    <span>Menu</span>
  </Menu.Trigger>
  <Menu.Portal>
    <Menu.List>
      <Menu.Item as={NextLink} href="/">
        Home
      </Menu.Item>
      <Menu.Item as={NextLink} href="/about">
        About
      </Menu.Item>
    </Menu.List>
  </Menu.Portal>
</Menu>

When using the Menu component with Menu.Portal and Menu.Item rendered as link (as={NextLink}), clicking the menu item closes the dropdown without triggering the actual navigation to the href.

Environment

  • PrimeReact: 11.0.0-alpha.9
  • React: 19.2.0
  • Next.js: 15.5.9
  • Tailwindcss: 4.1.17

Suspected Cause
It appears the click event handler that closes the Portal is preventing the default link behavior or stopping event propagation before the NextLink can trigger its navigation. The event sequence seems to prioritize closing the Portal over following the href.

Reproducer

No response

System Information
System:
    OS: Windows 11 10.0.26200
    CPU: (22) x64 Intel(R) Core(TM) Ultra 7 165H
    Memory: 10.30 GB / 31.46 GB
  Binaries:
    Node: 23.10.0 - C:\nvm4w\nodejs\node.EXE
    npm: 10.9.2 - C:\nvm4w\nodejs\npm.CMD
  Browsers:
    Chrome: 143.0.7499.147
    Edge: Chromium (140.0.3485.54)
    Firefox: 141.0 - C:\Program Files\Mozilla Firefox\firefox.exe
Steps to reproduce the behavior

See code snippet

Expected behavior

No response

主要言語
CSS
スター
8.3k
フォーク
1.2k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

primefaces/primereact のほかの issue

primefaces/primereact の issue をすべて見る

似ている issue

Web Dev の issue をもっと見る

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

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