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

RichTextLabel's text field does not clear without a space in the string #89435

Closed
ghostradiogames opened this issue Mar 13, 2024 · 2 comments
Closed

Comments

@ghostradiogames
Copy link

ghostradiogames commented Mar 13, 2024

Tested versions

Reproduced in 4.2.3 dev4 (Mono), but does not happen in 4.2.1 stable (Mono).

System information

Godot v4.3.dev4.mono - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop GPU (NVIDIA; 31.0.15.3758) - 12th Gen Intel(R) Core(TM) i7-12700H (20 Threads)

Issue description

In previous versions, you could clear a RichTextLabel object's text field by doing:
label.Text = "";

Now in 4.3.dev4 this no longer works. You can neither clear it with code, nor does deleting the text in the editor clear what is already there. You instead now need to put a blank space to clear the existing text, like:
label.Text = " ";

Steps to reproduce

Create a RichTextLabel, set some text. Delete the text in the box and note that it hasn't deleted. Then add a space and the text will disappear then.

In the sample project I uploaded, you can hit enter or space to change the text from code to test it. You can also check the bool in the scene to switch to setting in code with a space, which now works. Thank you.

Minimal reproduction project (MRP)

TestGame.zip

@bruvzg
Copy link
Member

bruvzg commented Mar 13, 2024

Should be already fixed by #89100

@AThousandShips
Copy link
Member

Thank you for reporting, consolidating in:

Which has been solved

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

No branches or pull requests

4 participants