Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlxInputText on JS crashes with when trying to make text go multiline #231

Open
ShaharMS opened this issue Feb 12, 2022 · 4 comments
Open

Comments

@ShaharMS
Copy link

  • 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:
image

you can also just add lots of letters/words instead of the "\n"

@DigiEggz
Copy link
Contributor

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

@ShaharMS
Copy link
Author

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

@DigiEggz
Copy link
Contributor

Good to hear. Can I ask which version of FlxInputText you're using?

@ShaharMS
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants