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

[bug] Multiline alt text tooltip includes indenting whitespace #3403

Open
TheLastZombie opened this issue Oct 7, 2024 · 1 comment
Open
Labels
bug Something isn't working frontend Frontend-related stuff

Comments

@TheLastZombie
Copy link

Describe the bug with a clear and concise description of what the bug is. Please include screenshots of any visual issues.

When submitting a post with an attachment that has an alt text which, in turn, consists of multiple lines, subsequent lines are indented in the tooltip displayed by the browser on hover.

What's your GoToSocial Version?

0.16.0+git-f1cbf6f

Browser version

LibreWolf 130.0-3 (also in Chromium)

What happened?

This is a snippet from a post on my profile:

                                                        <img
                                                            src="https://gotosocial.sny.sh/fileserver/01BG3X17KXSR2FSBSY9E6YGWWZ/attachment/small/01J9HPEQMSMRCPDNHBAHJ2KXWH.jpg"
                                                            loading="lazy"
                                                            alt="[hulk crying meme]
                                                        guys
                                                        I&#39;m starting to think about making my own text editor"
                                                            title="[hulk crying meme]
                                                        guys
                                                        I&#39;m starting to think about making my own text editor"
                                                            width="759"
                                                            height="900"
                                                        />

When hovering over the respective image, this tooltip appears:

image

What you expected to happen?

The lines should not be indented, and the tooltip should look like this:

image

How to reproduce it?

  1. Publish a post with an attachment with an alt text containing at least two lines of text.
  2. Hover over the attachment on your GoToSocial profile page.

Anything else we need to know?

According to the HTML Standard, LibreWolf/Chromium's behavior of not stripping the leading whitespace seems correct.

@TheLastZombie TheLastZombie added bug Something isn't working frontend Frontend-related stuff labels Oct 7, 2024
@tsmethurst
Copy link
Contributor

Oh yeah I remember this. Seen the bug before, just didn't have an issue open for it yet. It's my bug and I know why it's happening :') Will fix when time permits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Frontend-related stuff
Projects
None yet
Development

No branches or pull requests

2 participants