On Fri, 8 Nov 2024 00:39:34 GMT, Martin Fox <[email protected]> wrote:
>> 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.
The purpose of doing it this way is to prevent a full dispatch chain (starting
from Window/Scene) to be built. `EventUtil.fireEvent` does something else.
Perhaps a utility method is warranted if this pattern becomes commonplace to
solve these kinds of issues.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1629#discussion_r1833658093