RFR: 8290399: [macos] Aqua LAF does not fire an action event if combo box menu is displayed [v2]

Phil Race prr at openjdk.org
Fri Jul 22 19:09:07 UTC 2022


On Fri, 22 Jul 2022 09:09:00 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> When the user types Enter in an editable combo box, Aqua LAF fails to fire an action event if the menu is displayed.
>> It seems actionEvent is fired when popup menu is not visible. 
>> Fix is to make sure ActionEvent is fired irrespective of popup visiblity as is done in other L&F 
>> (for ex, in MetalL&F it calls "ENTER", JTextField.notifyAction, where it calls postActionEvent irrespectively)
>> https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/JTextField.java#L856
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Test made for macos

OK .. although the existing code even if it is surprising, looks very deliberate .. which makes me a little leery.
But we've plenty of time in JDK 20 to see if this causes a problem.

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

Marked as reviewed by prr (Reviewer).

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



More information about the client-libs-dev mailing list