Bug: When typing URL soon after opening a new tab, sometimes a few beginning characters get removed after half a second
Status: REOPENED
Priority: P3
Created: 2020-07-29 10:47:42+00:00
Resolved: 2022-04-12 00:31:07+00:00

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

- First of all I have fission.autostart disabled if anyone's wondering
- Open a new tab with the button or ctrl+T
- Immediately start typing "blah blah blah" as soon as possible after opening the new tab


Actual results:

- Sometimes: in the middle of typing "blah blah blah" the urlbar input field 'resets', meaning by the time I get to "bl" everything is deleted and I end up typing "ah blah blah" instead.
- When CPU usage is higher, this happens way more often, and the 'reset' ends up coming later which means it deletes way more characters.


Expected results:

First off I should say a lot of people including me submitted a suspiciously similar bug like 20 revisions back: https://bugzilla.mozilla.org/show_bug.cgi?id=1652217
That bug, which apparently was caused by a variable delay in searching the places DB, was fixed about 2 weeks ago: https://bugzilla.mozilla.org/show_bug.cgi?id=1652024

In that bug, when you typed into the urlbar, if you hit enter too soon after finishing typing your query, it would shave characters off the END of your query. If you tried to type "blah blah blah" you'd end up submitting "blah blah bl" instead. In this case something very similar is happening, except instead of shaving characters off the end, in practice it's shaving characters off the beginning. And it's not happening because you hit enter before the lookup finished—it's apparently happening because the input field's value is literally resetting while you're typing, eliminating whatever characters you had typed before the reset.

I don't know if this is mechanically related to the previous bug, but I do know that I only noticed this bug after the previous bug was fixed... and that I noticed it immediately after the previous bug was fixed. I update manually so I don't normally update every night. But I was following that bug closely as it was noticeably impeding my use of firefox, so I'm pretty sure I updated the moment that fix was reported on bugzilla. So I got the impression that this bug was somehow, whether directly or indirectly, precipitated by the fix for the previous bug.

Anyway, the best way to reproduce this would be to run some kind of light CPU benchmark in the background before you start. However, this happens to me practically all the time, not just when I'm running a lot of stuff in the background. I just mean that it's a lot more extreme and frequent under those conditions. When CPU usage is high, you don't need to start typing that soon after opening a new tab for the bug to occur. You could wait a whole second and still have it reset while you're typing.

It is an omnipresent problem, but it's hard to consistently reproduce on-demand because the more you try to do it, the less it seems to happen. I don't know of a good computer science analogy so I'll just say that it's like this happens when the engine is cold, and the more you try to reproduce the bug, the engine revs up and gets warmer, reducing the chances of it happening. It tends to happen to me when I've been on the same tab browser for 30+ minutes and then open a new tab to type in a google search.

I have also tested this on a new/blank profile as well as my main profile. It happens less frequently on the new profile but it still happens. I don't know if the reduced frequency is due to the lower size of the places DB, or if it's because my main profile has a lot of extensions, userscripts, css rules etc. that I can only assume would increase the computational load on the isolated process. I haven't tried to confirm that but I will if someone wants me to.

Sorry if this is unclear, it's a hard bug to put into words. I'll try to clarify if anyone has any questions I can answer.

Also I do recognize that there are limitations on a browser. This might be less of a broken feature than it's a nuisance caused by some kind of resource limitation, so the line between a defect report and an enhancement request are sort of blurry here. But this limitation never existed until recently, meaning I've used firefox for a decade without needing to slow down and hesitate before typing my search queries and URLs. I'm not really able to practice that habit at this point in the game, can't teach an old dog new tricks and all that.

I think if this is a limitation caused by new code supporting some major improvement like fission, then hopefully it can be worked around, but if not then maybe it's worth reevaluating some priorities. At least for me, being able to type search queries into the urlbar as soon as I open a new tab is more important than isolation. I just don't want to have to regulate how soon I start typing when I open a new tab, because it's a routine I have to repeat like literally hundreds or thousands of times per day. And I do type pretty quickly but there must be millions who type faster than me. So if it's affecting me I'm sure it's affecting many other people.