KDE/X11: Sometimes one browser window becomes unusable because requestAnimationFrame, ResizeObserver and IntersectionObserver stop working
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox109 | --- | wontfix |
firefox110 | --- | wontfix |
firefox111 | --- | wontfix |
People
(Reporter: Oriol, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
Recently it has started happening that sometimes when I have 2 windows, one becomes unusable:
- Can't seemingly open new tabs (they are created but remain invisible)
- Switching tabs behaves quite erratically
- Hamburguer menu has no text other than the keyboard shortcuts
- Toolbar context menu is missing most entries
I think that's because these operations delay some work with requestAnimationFrame, which stops invoking the callbacks.
I have been trying some things in the browser console, and these work fine:
setTimeout(() => console.log('setTimeout'), 0);
Promise.resolve().then(() => console.log('Promise.resolve'));
queueMicrotask(() => console.log('queueMicrotask'));
but these don't work:
requestAnimationFrame(() => console.log('requestAnimationFrame'));
new ResizeObserver(() => console.log("ResizeObserver")).observe(document.documentElement);
new IntersectionObserver(() => console.log("IntersectionObserver")).observe(document.documentElement);
So something seems broken with the event loop.
This only happens in one window, the other works fine. And I can just adopt the tabs of the broken window into a new one, which will work well:
gBrowser.addTab("about:blank", {triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()});
gBrowser.addRangeToMultiSelectedTabs(gBrowser.tabs[0], gBrowser.tabs[gBrowser.tabs.length - 2]);
gBrowser.replaceTabsWithWindow(gBrowser.selectedTab)
.addEventListener("before-initial-tab-adopted", function() { this.gBrowser.clearMultiSelectedTabs() }, {once: true});
I'm using Firefox 105.0 on Kubuntu 20.04. The problem has happened on 2 different PCs.
Comment 1•2 years ago
|
||
When it happens, what is document.hidden
? Can you attach about:support
? (Are you using Wayland or X, etc...)
Reporter | ||
Comment 2•2 years ago
|
||
document.hidden
is false
in the browser console for the broken window.
I'm using X.
Updated•2 years ago
|
Reporter | ||
Comment 3•2 years ago
|
||
Now I have not just one but two different windows that are broken like this (they broke at different times).
BTW, now I'm using Firefox 106.0.2 installed via snap on Ubuntu 22.04 with the KDE plasma desktop.
Comment 4•2 years ago
|
||
The severity field is not set for this bug.
:dholbert, could you have a look please?
For more information, please visit auto_nag documentation.
Reporter | ||
Comment 5•2 years ago
|
||
I was keeping around a broken private window. After some days, it has started working well again. Not sure if as a side-effect of something that I did, or if windows just break or get fixed randomly.
Reporter | ||
Comment 6•2 years ago
|
||
This happens when I start dragging a tab and click several times. See the video.
Sometimes it doesn't happen at the 1st attempt, but I can reproduce quite consistently in less than 5 attempts.
But I'm not sure how come tabs can break requestAnimationFrame
...
Reporter | ||
Comment 7•2 years ago
|
||
Firefox was not rendering the previous video, probably because I used H.265.
Reporter | ||
Comment 8•2 years ago
|
||
Comment 9•2 years ago
|
||
Set release status flags based on info from the regressing bug 1782049
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•