RFR: 8207759: VK_ENTER not consumed by TextField when default Button exists [v3]
John Hendrikx
jhendrikx at openjdk.org
Fri Nov 8 12:50:47 UTC 2024
On Wed, 11 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.
>
> Jeanette Winzenburg has updated the pull request incrementally with one additional commit since the last revision:
>
> added tests to guard against JDK-8145515
modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/behavior/TextFieldBehavior.java line 190:
> 188: if (onAction != null || actionEvent.isConsumed()) {
> 189: event.consume();
> 190: }
@kleopatra @kevinrushforth @aghaisas
Shouldn't this be an `&&` ? Now having an empty `setOnAction` that doesn't consume anything (but just logs for example) will affect the operation of this control.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/15#discussion_r1834354878
More information about the openjfx-dev
mailing list