Track the next KEY_TYPED related to the mnemonic key press event so it will be consumed but the keyboard focus manager

This commit is contained in:
anass baya 2025-08-15 00:20:28 +01:00
parent fcb68ea22d
commit 94bab37292
2 changed files with 1 additions and 1 deletions

View file

@ -379,6 +379,7 @@ public class BasicPopupMenuUI extends PopupMenuUI {
} else if (item.isEnabled()) {
// we have a menu item
manager.clearSelectedPath();
sun.awt.SunToolkit.consumeNextKeyTyped(e);
item.doClick();
}
e.consume();

View file

@ -491,7 +491,6 @@ java/awt/Graphics2D/DrawString/RotTransText.java 8316878 linux-all
java/awt/KeyboardFocusmanager/TypeAhead/ButtonActionKeyTest/ButtonActionKeyTest.java 8257529 windows-x64
java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest/ConsumeForModalDialogTest/ConsumeForModalDialogTest.java 8302787 windows-all
java/awt/KeyboardFocusmanager/TypeAhead/MenuItemActivatedTest/MenuItemActivatedTest.java 8302787 windows-all
java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest/ConsumeNextMnemonicKeyTypedTest.java 8321303 linux-all
java/awt/Window/GetScreenLocation/GetScreenLocationTest.java 8225787 linux-x64
java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java 8266243 macosx-aarch64