[Rev 01] RFR: 8207759: VK_ENTER not consumed by TextField when default Button exists

Ajit Ghaisas aghaisas at openjdk.java.net
Tue Dec 10 12:26:28 UTC 2019


On Tue, 10 Dec 2019 12:26:27 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> This is a fix for https://bugs.openjdk.java.net/browse/JDK-8207759
>> 
>> The issue is that default/cancel button on a scene are triggered even though a onKeyPressed handler for ENTER/CANCEL consumes the keyEvent. See the bug for details on both cause and fix.
>> 
>> There are additional/changed tests to verify the fix. All old tests are passing.
> 
> The pull request has been updated with 1 additional commit.

Changes look OK apart from one doubt I have listed.

modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java line 626:

> 625:     protected void fire(KeyEvent event) { } // TODO move to TextFieldBehavior
> 626:     protected void cancelEdit(KeyEvent event) { };
> 627: 

Will this code removal re-introduce JDK-8145515?

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



PR: https://git.openjdk.java.net/jfx/pull/15


More information about the openjfx-dev mailing list