Hi, Prasanta.

The "SwingUtilities.getRootPane" may return null, at least we have null
check in the similar code in AquaComboBoxUI.triggerSelectionEvent()

On 5/6/20 1:45 am, Prasanta Sadhukhan wrote:
ping?

On 27-Apr-20 9:32 PM, Prasanta Sadhukhan wrote:
Hi All,

Please review a fix for an issue where it is seen that ComboBox is consuming 
Enter key without taking action on it.

The test was introduced by JDK-8058193 where the "Escape" and "Enter" key 
problem for ComboBox was fixed for mac, but it was seen still for windows and linux.

This is because for windows & linux, BasicComboBoxUI#accept "Enter" key but 
when actual actionPerformed() was done for Enter Key, it was seen that InputMap for VK_ENTER 
is not set up so no action is performed on it.

Proposed fix is to check upfront whether to accept this key VK_ENTER by 
checking if InputMap for VK_ENTER is set up or not, else fall back to 
SwingUtilities#notifyAction() where the user actionPerformed will be called 
instead.

Bug: https://bugs.openjdk.java.net/browse/JDK-8067986

webrev: http://cr.openjdk.java.net/~psadhukhan/8067986/webrev.0/

Regards
Prasanta


--
Best regards, Sergey.

Reply via email to