ADDITIONAL SYSTEM INFORMATION :
Tested on JavaFX 13 and 19
A DESCRIPTION OF THE PROBLEM :
The following exception is thrown when the Delete key is pressed under specific circumstances, in one of the custom edit boxes:
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: The start must be <= the end
at javafx.controls@19/javafx.scene.control.TextInputControl.getText(TextInputControl.java:459)
at javafx.controls@19/javafx.scene.control.TextInputControl.updateContent(TextInputControl.java:573)
at javafx.controls@19/javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:564)
at javafx.controls@19/com.sun.javafx.scene.control.skin.InputFieldSkin$1.replaceText(InputFieldSkin.java:70)
at javafx.controls@19/javafx.scene.control.TextInputControl.deleteText(TextInputControl.java:509)
at javafx.controls@19/javafx.scene.control.TextInputControl.deleteNextChar(TextInputControl.java:972)
at javafx.controls@19/javafx.scene.control.skin.TextFieldSkin.deleteChar(TextFieldSkin.java:466)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextFieldBehavior.deleteChar(TextFieldBehavior.java:181)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.deleteNextChar(TextInputControlBehavior.java:498)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$new$14(TextInputControlBehavior.java:146)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$keyMapping$62(TextInputControlBehavior.java:344)
at javafx.controls@19/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
at javafx.base@19/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at javafx.base@19/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base@19/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@19/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base@19/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base@19/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics@19/javafx.scene.Scene$KeyHandler.process(Scene.java:4113)
at javafx.graphics@19/javafx.scene.Scene.processKeyEvent(Scene.java:2159)
at javafx.graphics@19/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2627)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:218)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:150)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:250)
at javafx.graphics@19/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:249)
at javafx.graphics@19/com.sun.glass.ui.View.handleKeyEvent(View.java:542)
at javafx.graphics@19/com.sun.glass.ui.View.notifyKey(View.java:966)
at javafx.graphics@19/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics@19/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: The start must be <= the end
at javafx.controls@19/javafx.scene.control.TextInputControl.getText(TextInputControl.java:459)
at javafx.controls@19/javafx.scene.control.TextInputControl.updateContent(TextInputControl.java:573)
at javafx.controls@19/javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:564)
at javafx.controls@19/com.sun.javafx.scene.control.skin.InputFieldSkin$1.replaceText(InputFieldSkin.java:70)
at javafx.controls@19/javafx.scene.control.TextInputControl.deleteText(TextInputControl.java:509)
at javafx.controls@19/javafx.scene.control.TextInputControl.deleteNextChar(TextInputControl.java:972)
at javafx.controls@19/javafx.scene.control.skin.TextFieldSkin.deleteChar(TextFieldSkin.java:466)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextFieldBehavior.deleteChar(TextFieldBehavior.java:181)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.deleteNextChar(TextInputControlBehavior.java:498)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$new$14(TextInputControlBehavior.java:146)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$keyMapping$62(TextInputControlBehavior.java:344)
at javafx.controls@19/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
at javafx.base@19/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at javafx.base@19/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base@19/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@19/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base@19/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base@19/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics@19/javafx.scene.Scene$KeyHandler.process(Scene.java:4113)
at javafx.graphics@19/javafx.scene.Scene.processKeyEvent(Scene.java:2159)
at javafx.graphics@19/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2627)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:218)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:150)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:250)
at javafx.graphics@19/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:249)
at javafx.graphics@19/com.sun.glass.ui.View.handleKeyEvent(View.java:542)
at javafx.graphics@19/com.sun.glass.ui.View.notifyKey(View.java:966)
at javafx.graphics@19/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics@19/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:834)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- Launch the Custom Colors dialog
- Select the 'Opacity' edit box (should display '100')
- Move the cursor to the left of "1" in 100 (left most position)
- Press the Delete key
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The edit box text deletes
ACTUAL -
IllegalArgumentException is thrown
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.ColorPicker;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class App extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) {
final var colorPicker = new ColorPicker();
final var root = new StackPane();
root.getChildren().add(colorPicker);
stage.setScene(new Scene(root, 300, 250));
stage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None found
FREQUENCY : always
Tested on JavaFX 13 and 19
A DESCRIPTION OF THE PROBLEM :
The following exception is thrown when the Delete key is pressed under specific circumstances, in one of the custom edit boxes:
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: The start must be <= the end
at javafx.controls@19/javafx.scene.control.TextInputControl.getText(TextInputControl.java:459)
at javafx.controls@19/javafx.scene.control.TextInputControl.updateContent(TextInputControl.java:573)
at javafx.controls@19/javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:564)
at javafx.controls@19/com.sun.javafx.scene.control.skin.InputFieldSkin$1.replaceText(InputFieldSkin.java:70)
at javafx.controls@19/javafx.scene.control.TextInputControl.deleteText(TextInputControl.java:509)
at javafx.controls@19/javafx.scene.control.TextInputControl.deleteNextChar(TextInputControl.java:972)
at javafx.controls@19/javafx.scene.control.skin.TextFieldSkin.deleteChar(TextFieldSkin.java:466)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextFieldBehavior.deleteChar(TextFieldBehavior.java:181)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.deleteNextChar(TextInputControlBehavior.java:498)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$new$14(TextInputControlBehavior.java:146)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$keyMapping$62(TextInputControlBehavior.java:344)
at javafx.controls@19/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
at javafx.base@19/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at javafx.base@19/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base@19/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@19/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base@19/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base@19/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics@19/javafx.scene.Scene$KeyHandler.process(Scene.java:4113)
at javafx.graphics@19/javafx.scene.Scene.processKeyEvent(Scene.java:2159)
at javafx.graphics@19/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2627)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:218)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:150)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:250)
at javafx.graphics@19/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:249)
at javafx.graphics@19/com.sun.glass.ui.View.handleKeyEvent(View.java:542)
at javafx.graphics@19/com.sun.glass.ui.View.notifyKey(View.java:966)
at javafx.graphics@19/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics@19/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: The start must be <= the end
at javafx.controls@19/javafx.scene.control.TextInputControl.getText(TextInputControl.java:459)
at javafx.controls@19/javafx.scene.control.TextInputControl.updateContent(TextInputControl.java:573)
at javafx.controls@19/javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:564)
at javafx.controls@19/com.sun.javafx.scene.control.skin.InputFieldSkin$1.replaceText(InputFieldSkin.java:70)
at javafx.controls@19/javafx.scene.control.TextInputControl.deleteText(TextInputControl.java:509)
at javafx.controls@19/javafx.scene.control.TextInputControl.deleteNextChar(TextInputControl.java:972)
at javafx.controls@19/javafx.scene.control.skin.TextFieldSkin.deleteChar(TextFieldSkin.java:466)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextFieldBehavior.deleteChar(TextFieldBehavior.java:181)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.deleteNextChar(TextInputControlBehavior.java:498)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$new$14(TextInputControlBehavior.java:146)
at javafx.controls@19/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$keyMapping$62(TextInputControlBehavior.java:344)
at javafx.controls@19/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
at javafx.base@19/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at javafx.base@19/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
at javafx.base@19/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base@19/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base@19/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base@19/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base@19/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base@19/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base@19/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics@19/javafx.scene.Scene$KeyHandler.process(Scene.java:4113)
at javafx.graphics@19/javafx.scene.Scene.processKeyEvent(Scene.java:2159)
at javafx.graphics@19/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2627)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:218)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:150)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:250)
at javafx.graphics@19/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics@19/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:249)
at javafx.graphics@19/com.sun.glass.ui.View.handleKeyEvent(View.java:542)
at javafx.graphics@19/com.sun.glass.ui.View.notifyKey(View.java:966)
at javafx.graphics@19/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics@19/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:834)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- Launch the Custom Colors dialog
- Select the 'Opacity' edit box (should display '100')
- Move the cursor to the left of "1" in 100 (left most position)
- Press the Delete key
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The edit box text deletes
ACTUAL -
IllegalArgumentException is thrown
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.ColorPicker;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class App extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) {
final var colorPicker = new ColorPicker();
final var root = new StackPane();
root.getChildren().add(colorPicker);
stage.setScene(new Scene(root, 300, 250));
stage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None found
FREQUENCY : always