flixel-ui
flixel-ui copied to clipboard
FlxInputText on JS crashes with when trying to make text go multiline
- haxe version - 4.2.4
- flixel version - 4.11.0
- flixel-ui version - 2.4.0
the title explains it. code snippet to reproduce the crash quickly:
var input = new FlxInputText(100, 100, 300, 15);
input.wordWrap = true;
add(input);
input.text += "\n";
I'm using Firefox and it crashes with shader is null
:
you can also just add lots of letters/words instead of the "\n"
I was able to get the same issue to occur, but only when using the "\n" newline character. It may be related to this: https://stackoverflow.com/questions/23401536/newline-characters-n-r-not-being-respected-with-openfl-flash-text-textfield
Tbh I got to fixing it, it's just that all of the conditionals are redundant and the isated code is causing the issue. For now I'm just using another version of FlxInputText
Good to hear. Can I ask which version of FlxInputText you're using?
It's the one on my haxelib (texter), I link the github 9ne cause it's more comfortable to read:
https://github.com/ShaharMS/texter/blob/main/src/texter/flixel/_internal/FlxInputText.hx