Open Bug 1810136 Opened 2 years ago Updated 2 years ago

Text stops rendering when putting long strings in the URL bar

Categories

(Core :: Graphics: Text, defect)

Desktop
macOS
defect

Tracking

()

Tracking Status
firefox110 --- affected

People

(Reporter: Gijs, Unassigned)

References

Details

STR:

  1. open https://onlinepngtools.com/convert-png-to-data-uri
  2. scroll down and click the picture of trees on the left
  3. triple click (or right click + select all) in the "data uri" box on the right that gets scrolled back into view
  4. cmd-l to focus the address bar
  5. cmd-v to paste

ER:
text shows up in the address bar

AR:
there is a slight pause and then text renders in the autocomplete box (which I think substrings the text?), and the cursor moves to the end of the address bar, but it almost seems like all the text gets rendered as spaces - the address bar input itself appears empty, other than the cursor being at the very end. You can then use the left/right arrow keys to move around in these space-rendered characters....

If you cmd-left-arrow, the start of the text does get rendered.

Checking in the browser console, pasting the text in the input field there (which wraps it) does work (and renders the end of it), though it makes typing slow, and the total length of the string is apparently 957522 characters.

Tested on Nighty on macOS 12 (Monterey), unsure if this is a platform-specific problem.

This doesn't seem to reproduce for me (Nightly on Monterey); the text does show up in the address bar when pasted, although it's sluggish. However, it looks like it isn't actually scrolled all the way to the right; the end of the visible text doesn't match the true end of the encoded data URI. And the cursor position is inaccurate: attempting to edit (e.g. to insert a new character, or select & copy a substring from the address bar) won't work correctly.

I think this is a known issue with extremely long lines, where some kind of numerical issue (maybe limits of floating-point accuracy?) make measurement and/or rendering start to get erratic. There may be an existing bug on file about something similar.

The severity field is not set for this bug.
:lsalzman, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(lsalzman)
Severity: -- → S3
Flags: needinfo?(lsalzman)
You need to log in before you can comment on or make changes to this bug.