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: Wrong meta link detection when used inside a fill tag #35040

Closed
Tracked by #39144
timothyqiu opened this issue Jan 12, 2020 · 5 comments
Closed
Tracked by #39144

Comments

@timothyqiu
Copy link
Member

Godot version: v3.2.beta.custom_build.b563de702

OS/device including version: macOS Catalina 10.15.2 / MacBook Pro (Retina, 13-inch, Early 2015)

Issue description:
The [fill] tag in RichTextLabel will adjust the word spacing to make lines to fill all the width of the control.

When the word spacing inside a link is adjusted by this tag, the visual display of words is correct, but the mouse cursor and signal emission acts as if the word spacing is not adjusted.

demo

This seems to be a long existing issue. I can reproduce this in 3.1.2.

Steps to reproduce:

  1. Add a RichTextLabel to the scene
  2. Set the BBCode to something like "[fill]This is a test and [url=test]here is alinkwith many words[/url] that wraps[/fill]"
  3. Resize the RichTextLabel, so the word spacing in the link are adjusted
  4. Run the project and try to find the link with your mouse

Minimal reproduction project: RichTextLabelTest.zip

@KoBeWi
Copy link
Member

KoBeWi commented Nov 27, 2020

Still valid in 3.2.4 beta3

@Bethleem
Copy link

I was going to report this same bug. It runs from at least from 3.1.1 to 3.2.4 beta. The issue is that the text behaves with the fill tag but the url don´t, it just always marks as interactive the areas where the text should be with no fill tag, no matter if fill is activated or not.

@Bethleem
Copy link

Bethleem commented Dec 30, 2020

Indeed, It runs at least from the whole 2.x series. In this proyect from 3.2.3 you can see two identical lines with some last words as url.
The first line has no fill tag and the url returns "1" in the editor when clicked. The second has the fill tag and a additional word for the fill kick in, and the url returns "2" in the editor when clicked. The interactive area of the second (fill) line is exactly the same as the first (no fill) line, despite it not matches the actual url words. You can see it clearly when click in the "el" word before the underline text of the second line and the absence of return in the final "ce" letters of the "enlace" word.

Otherwise, if you use the [center] tag instead of the [fill] tag, the interactive areas do match perfectly the rearranged url words. So the bug should be easy to fix. :)

@timothyqiu
Copy link
Member Author

timothyqiu commented Jun 9, 2021

This has been fixed on master by Complex Text Layouts, but still reproducible on 3.3.2 and the 3.x branch.

@akien-mga
Copy link
Member

Fixed by #54114.

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

5 participants