-
Bug
-
Resolution: Fixed
-
P4
-
jfx21
-
None
-
b23
macOS 14.2.1
To reproduce:
- run the attached program (TextField inside a JFXPanel)
- switch input language to Arabic
- type 'a'
NPE gets thrown with Hebrew and Russian input.
Japanese, French, and German seem to work except for some key strokes such as semicolon (;) in German and tick (') in French.
(the same scenario works fine in with JTextField in a regular FX application).
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.input.KeyCode.isFunctionKey()" because the return value of "javafx.scene.input.KeyEvent.getCode()" is null
at javafx.controls/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$46(TextInputControlBehavior.java:196)
at javafx.controls/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$81(TextInputControlBehavior.java:344)
at javafx.controls/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics/javafx.scene.Scene.processKeyEvent(Scene.java:2195)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2716)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$15(EmbeddedScene.java:376)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$14(EmbeddedScene.java:362)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$11(PlatformImpl.java:456)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$10(PlatformImpl.java:455)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
To reproduce:
- run the attached program (TextField inside a JFXPanel)
- switch input language to Arabic
- type 'a'
NPE gets thrown with Hebrew and Russian input.
Japanese, French, and German seem to work except for some key strokes such as semicolon (;) in German and tick (') in French.
(the same scenario works fine in with JTextField in a regular FX application).
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.input.KeyCode.isFunctionKey()" because the return value of "javafx.scene.input.KeyEvent.getCode()" is null
at javafx.controls/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$46(TextInputControlBehavior.java:196)
at javafx.controls/com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$81(TextInputControlBehavior.java:344)
at javafx.controls/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics/javafx.scene.Scene.processKeyEvent(Scene.java:2195)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2716)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$15(EmbeddedScene.java:376)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$14(EmbeddedScene.java:362)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$11(PlatformImpl.java:456)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$10(PlatformImpl.java:455)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
- relates to
-
JDK-8090319 Full support for keyboard keys in KeyCode (currently, many "special keys" equal KeyCode.UNDEFINED when handling KeyEvents)
- Open
- links to
-
Commit openjdk/jfx/14cd9806
-
Review(master) openjdk/jfx/1470