RFR: 8294067: [macOS] javax/swing/JComboBox/6559152/bug6559152.java Cannot select an item from popup with the ENTER key.

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Sep 20 16:53:55 UTC 2022


On Tue, 20 Sep 2022 15:57:24 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

> The newly fix-sized JComboBox has its dropdown menu opened with this test's mouse click. The goal of the test is to focus the JComboBox, open the dropdown menu, and select the 2nd option of the menu using arrow keys and ENTER key. Since the JComboBox is focused without the click already, the click can be removed.

I think the click is needed to gain focus in some CI systems..
The thing is it does not fail in non macos systems so far makes it interesting..
Probably the mouseMove(p.x, p.y) is not actually moving the mouse to the combobox interior area in hidpi systems and it does not fail in windows probably because it is running in nonhidpi systems.

I guess probably the right fix will be to do
`robot.mouseMove(p.x + comboBox.width/2, p.y + comboxBox.height/2)` to make sure it is clicked inside the combobox

Also, better to run in all platforms after the test fix and put in JBS.

-------------

PR: https://git.openjdk.org/jdk/pull/10359



More information about the client-libs-dev mailing list