-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
When editing textfields of numbersteppers with float values if we press repeatedly the arrows to select a section and then try to use backspace to remove text we create an error in how the fonts are rendered.
Expected Behavior
No bug should occur when editing the textfield of a numberstepper. I.e. the issue could be coming from the numberstepper adding to the pos value when using the arrow keys.
Current Behavior
When trying to edit textfields of numbersteppers it's bug out and jams the UI. The error message in the debug console outputs this:
TypeError: Cannot read property 'xadvance' of undefined
at kha_KravurImage.getCharWidth (/home/jsnadeau/Kha/Sources/kha/Kravur.hx:99:28)
at kha_KravurImage.charactersWidth (/home/jsnadeau/Kha/Sources/kha/Kravur.hx:117:13)
at kha_Kravur.widthOfCharacters (/home/jsnadeau/Kha/Sources/kha/Kravur.hx:207:15)
at haxe_ui_backend_kha_TextField.render (/home/jsnadeau/foundsdk/haxeui-kha/haxe/ui/backend/kha/TextField.hx:866:44)
at haxe_ui_core_TextInput.renderTo (/home/jsnadeau/foundsdk/haxeui-kha/haxe/ui/backend/TextInputImpl.hx:101:9)
at haxe_ui_components_TextField.renderTo (/home/jsnadeau/foundsdk/haxeui-kha/haxe/ui/backend/ComponentImpl.hx:163:13)
at haxe_ui_components_NumberStepper.renderTo (/home/jsnadeau/foundsdk/haxeui-kha/haxe/ui/backend/ComponentImpl.hx:169:13)
Possible Solution
If the issue is coming from the numberstepper incrementing/decrementing to the pos value when using the arrow keys removing this feature when editing the text could be a solution.
Steps to Reproduce (for bugs)
- Start editing textfield of numberstepper
- Try selecting a section, then use backspace while using the arrows.
Media
Test app / minimal test case
Context
Trying to have editable numbersteppers
Your Environment
- Version used: haxeui-kha git version
- Environment name and version (e.g. Chrome 39, node.js 5.4): kha debug-html5
- Operating System and version (desktop or mobile): Linux debian 10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels