patternfly / patternfly/patternfly-react

Bug - [Menu] - Flyout stays open when hovering a disabled item

オープン 初心者向け
#12,637 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

主要言語
TypeScript
スター
862
フォーク
392
平均マージ
4日 8時間
マージ済み PR(30日)
9

説明

Describe the problem

In a Menu with containsFlyout, a flyout submenu stays open after the pointer moves from the flyout trigger onto a disabled item.

Hovering an enabled item without a flyout correctly calls setFlyoutRef(null). Disabled items never get that hover:

  1. isDisabled: .pf-v6-c-menu__list-item.pf-m-disabled has pointer-events: none, so onMouseOver does not fire.
  2. isAriaDisabled: MenuItem skips onMouseOver when isAriaDisabled is true, so setFlyoutRef(null) never runs.

How do you reproduce the problem?

  1. Open a Menu with containsFlyout.
  2. Include a flyout item, then a disabled item (isDisabled or isAriaDisabled) immediately after it.
  3. Hover the flyout item until the submenu opens.
  4. Move the pointer onto the disabled item.

Expected behavior

The flyout closes, same as hovering any other non-flyout item.

Is this issue blocking you?

No, however there is no workaround without avoiding hard-disabled items.

What is your environment?

  • OS: macOS

  • Browser: Chrome

  • Version: PatternFly React 6.6.0

What is your product and what release date are you targeting?

OpenShift Virtualization (kubevirt-plugin)

Any other information?

Seen in MenuItem.js: onMouseOver on the li is a no-op when isAriaDisabled is true. CSS: pointer-events: none on disabled list items.

https://github.com/user-attachments/assets/2b2aa70e-57ad-4ec5-97c2-2ccb8148bc8f


Jira Issue: PF-4613

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

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

はじめの一歩

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

調査の方向性

MenuItem.js から始め、issue で説明されている disabled と aria-disabled の処理に注目し、disabled 項目の CSS の挙動を調べます。trigger の後にある disabled 項目で flyout の操作を再現し、その後、どちらの disabled バリアントに移動しても、flyout ではない項目と同様に flyout が閉じることを確認します。

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

評価

技術スタック
react, typescript
領域
frontend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
78/100

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

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