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

Alexander Zvegintsev azvegint at openjdk.org
Thu Jul 21 18:09:03 UTC 2022


On Tue, 19 Jul 2022 08:13:23 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

test/jdk/javax/swing/JComboBox/JComboBoxActionEvent.java line 82:

> 80:     public static void main(String[] args) throws Exception {
> 81: 
> 82:         UIManager.setLookAndFeel("com.apple.laf.AquaLookAndFeel");

Shouldn't the test be macOS only?

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

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



More information about the client-libs-dev mailing list