RFR: 8337246: SpinnerSkin does not consume ENTER KeyEvent when editor ActionEvent is consumed [v2]
Martin Fox
mfox at openjdk.org
Fri Nov 8 00:41:47 UTC 2024
On Thu, 7 Nov 2024 20:36:50 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> This is a proof of concept fix for the linked issue.
>>
>> We'll need to discuss if using an event filter in the Behavior is the appropriate fix and how much impact this may have on current applications.
>
> John Hendrikx has updated the pull request incrementally with one additional commit since the last revision:
>
> Change default button tests to use non-editable spinner
modules/javafx.controls/src/main/java/javafx/scene/control/skin/SpinnerSkin.java line 193:
> 191: // on arrow keys, moving the cursor unexpectedly.
> 192: if (!e.isConsumed() && control.isEditable()) {
> 193: Event event = textField.getEventDispatcher().dispatchEvent(e.copyFor(textField, textField), new EventDispatchChainImpl());
It would be cleaner to use the exiting `EventUtil.fireEvent()` routine.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1629#discussion_r1833545233
More information about the openjfx-dev
mailing list