I have this exact same issue, for a long time already, today I miraculously figured out a fix/workaround.
TL;DR:
Start a new window by dragging a tab away from your misbehaving window. Roughly 25 seconds later, this new window will start functioning again. Drag all your misbehaving tabs over to this new window, and they will immediately start working again too.
Problem description
Firefox version
137.0.2 (64-bit) Snap for Ubuntu
Running on Ubuntu 22.04.5 LTS
It appears sporadically, usually near the end of the day (I'd guess after about 3 to 6 hours of working in Firefox). It's hard to say how often it happens (it's hard to notice when it doesn't happen) but I'd say it's about 50% of my working days.
It almost always occurs while I'm typing. I've never encountered my browser in this state after reading/scrolling for a while, as far as I can tell it always appears mid-sentence or mid-word. It doesn't progressively get slower, it goes from working normally to a delay of 15 seconds per key-press.
When the issue appears, it always appears immediately, and on all windows that I have open.
All other functions of the browser remain working just like normal. So typing something in a text editor, and copying it over to the browser (using the mouse menu for pasting, not ctrl + v, so you don't have to wait 15 seconds for it to happen) is a fine temporary workaround.
A better solution for your sanity is shutting down the browser and restarting it. This always solves it for me, and usually it doesn't reoccur in the same session. I have Firefox configured to remember my open tabs and windows between sessions, and Firefox takes a few minutes to fully load after stopping, so this is not an ideal solution. (I've already tried to start from a fresh profile a few months ago, this didn't help)
Finding a solution
I tried to see if it appears in all input-fields, like suggested in the comments here. While messing around there, the problem actually disappeared. I've never managed to make it go away before, so I just spent a few hours trying to isolate the actions that make the problem go away.
When the issue is fixed. It's fixed for that window and all it's tabs.
When you go to a window that still has the issue, you can create a new tab there, and drag it, to make a new window, this window will then inherit the issue. Creating a new window via the menu has the same effect.
I spent a lot of time trying to pinpoint what actions caused it to be fixed in the new window, finally I figured out that it's just always fixed after about 25 seconds, no matter what you do. Give the window focus, don't give it focus, press keys randomly, keep a key pressed down or wait 30 seconds before you press a key, click in the address-bar, don't click in the address bar. It doesn't matter. When you create a new window, 25 seconds later, that window no longer has the issue.
So that doesn't help to fix the windows that already have the issue... But, what you can do is create a new window, drag the tabs of the broken window there, and wait 25 seconds. Dragging a tab to a working window fixes it instantly. Dragging a tab to a newly created window, in the first 25 seconds doesn't fix it yet, but it will then be fixed when the 25 seconds have passed.
Final thoughts
I hope this helps some people fix their sessions without having to restart their browser. And maybe this will even help someone find the cause for this issue, so it can be fixed!
I'm not sure this is related, but I saw a lot of errors like this, around the time the problem started, in the "Browser console":
17:37:27.561 Error: Connection closed, pending request to server0.conn0.watcher2.process4//styleSheetsActor476, type getText failed
Request stack:
request@resource://devtools/shared/protocol/Front.js:299:14
generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:47:19
_fetchSourceText@resource://devtools/client/styleeditor/StyleSheetEditor.sys.mjs:287:40
baseFrontClassDestroy resource://devtools/shared/protocol/Front.js:105
destroy resource://devtools/shared/protocol/Front.js:73
destroy resource://devtools/shared/protocol/Pool.js:213
baseFrontClassDestroy resource://devtools/shared/protocol/Front.js:109
purgeRequests resource://devtools/client/devtools-client.js:679
onPacket resource://devtools/client/devtools-client.js:470
send resource://devtools/shared/transport/local-transport.js:73
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
StyleSheetEditor.sys.mjs:342:17
Request stack:
request@resource://devtools/shared/protocol/Front.js:299:14
generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:47:19
_fetchSourceText@resource://devtools/client/styleeditor/StyleSheetEditor.sys.mjs:287:40
baseFrontClassDestroy resource://devtools/shared/protocol/Front.js:105
destroy resource://devtools/shared/protocol/Front.js:73
destroy resource://devtools/shared/protocol/Pool.js:213
baseFrontClassDestroy resource://devtools/shared/protocol/Front.js:109
purgeRequests resource://devtools/client/devtools-client.js:679
onPacket resource://devtools/client/devtools-client.js:470
send resource://devtools/shared/transport/local-transport.js:73
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
StyleEditorUI.sys.mjs:1574:15
Error: Target already destroyed, unable to fetch children fronts
getFront resource://devtools/client/fronts/targets/target-mixin.js:235
_getStyleSheetsFront resource://devtools/client/styleeditor/StyleSheetEditor.sys.mjs:946
_fetchSourceText resource://devtools/client/styleeditor/StyleSheetEditor.sys.mjs:279
fetchSource resource://devtools/client/styleeditor/StyleSheetEditor.sys.mjs:333
#addStyleSheetEditor resource://devtools/client/styleeditor/StyleEditorUI.sys.mjs:712
promise resource://devtools/client/styleeditor/StyleEditorUI.sys.mjs:576
StyleSheetEditor.sys.mjs:342:17
Edit to add:
I have a hunch this bug may be caused by one (or a combination) of the extensions I'm using. But since the bug only appears occasionally and cannot be reproduced at will, this is very hard to test... If we all have the same uncommon combination of extensions, that could be a clue?
I'm using:
- Privacy badger 2025.3.27
- uBlock Origin 1.63.2
- Bitwarden - Free Password Manager (disabled) 2024.4.1
- floccus bookmarks sync (disabled) 5.5.3
- PassFF (disabled) 1.22.1
I've just disabled some of these, as a test, they were all active when the issue appeared before.
Edit2: The issue just reappeared, so it seems that it wasn't Bitwarden, Floccus or PassFF... I've now Disabled Privacy Badger and uBlock, lets see if that prevents it from reappearing.
Also, it seems like the "fix" of moving into a new window, doesn't fix it very long term. Both times I've used this I still had to restart a few minutes later. One time Firefox just fully hung, another time the delay reappeared.
Edit3: It doesn't seem the issue is caused by any of the plugins, as it also appeared with the other half of my plugins deactivated.
Firefox still has the tendency to occasionally freeze and require a restart, but I'm not sure that this is actually related, or made more likely, by the typing/input issue. So "fixing" the input lag by creating a new window does still seem to offer a functional work-around.
Open file...dialog? Anything in the console (Ctrl+Shift+K)? Any high CPU usage of one particular thread of firefox or the X11 server?