You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] animateContextMenus.uc.js started flickering sometimes #111
Describe the bug
Hi.
Well, I'm not 100% sure if this is a script bug or just a conflict with other stuff on my side.
However, sometimes calling the context menu causes a visual flickering..?
Like if the context menu opens first and then is immediately covered by an animated version.
But most of the time it works fine.
If I delete the animateContextMenus.uc.js file, there is no such problem, the context menu always opens correctly, but without the cool animation of course, which I'm already very used to seeing..
Any ideas?
tia
To Reproduce
Just right-click anywhere on the page, on links, on images, everywhere.
And sometimes it can glitch, but calling it again in the same place will probably work correctly.
Expected behavior
Opening the context menu without any visual problems and with smooth animation.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Windows 11 Pro Dev Preview 27802.1000
Firefox update channel: Nightly
Version: 137.0a1
Build ID:
Additional context
Add any other context about the problem here.
Does this only happen if the context menu is already open when you right-click somewhere else? That seems to be what you're doing in the video, just right-clicking a lot. So the menu is already open when you right-click, it's just being closed and reopened in a new location. Can you try it without that? Like fully close the context menu before reopening it. That would likely narrow down the issue.
I'm also noticing your context menu appearance is very different from vanilla. Have you reproduced this issue with just the script on vanilla firefox? And what is the value of the preference browser.display.windows.non_native_menus?
Hello again and thanks for the reply.
Oh, does it look like I'm clicking too fast? Sorry about that.
Well, this happens in normal mode (at normal speed, so to speak) of use while I'm browsing normally, that's why I notice it, and it's annoying.
So I decided to look for the problematic script, CSS rule or setting by disabling one by one.
And it turned out that if I exclude this script the menu starts working as it should, but I lose the nice animation.
That's why I'm here in the first place.
I'm not saying that it's this script specifically, I don't really understand it and can't say for sure.
It could also be a combination of some setting with this script.
Because, as you noted, my Firefox is quite customized.
I'll definitely test this on the vanilla version with just the script installed.
I understand, I'm just trying to understand if it has to do with the menu closing and opening at the same time. So just close the menu before opening it again so I can see if it still happens. You can close the menu with Escape key or by just left-clicking outside of it.
Yeah, I tested it on a new clean profile where only the fx-autoconfig and the animateContextMenus.uc.js script were installed and it looks like the menu animation works fine.
At least I couldn't reproduce this glitch no matter how hard I tried.
So it looks like something else is interfering and conflicting.
Well, I'll have to try and eliminate one by one.
Any guesses as to what it could be?
I mean, based on your experience, is it more likely some other script, CSS rule or program preferences?
tia
This is what I have in my JS folder, if that makes sense:
Well I wouldn't expect you to see an animation issue if you uninstall this script, since there is no animation at all without the script. What I'm wondering is whether some other script or CSS you have installed is interacting with my script. Two scripts can work fine on their own, but when combined, you can have issues. Same with CSS. So that's why I want to know whether you still see the problem on a "clean" profile that has no other scripts or CSS other than this one. It's all I can really do to debug, since I haven't been able to reproduce the problem on my own setup.
Yes, I understand that and what you've already written gives some food for thought.
At least now I know that the script itself works and it's not related to any updates or changes in latest Firefox.
Although, I must say that I've been using this setup for quite a long time and everything worked without glitches before.
And only recently, about a week or two ago, I began to notice this bad behavior.
So who knows.
Thanks anyway, I'll look for the conflicting part, and if I can find a solution, I'll write here for information for those who may encounter such a problem.
Activity
aminomancer commentedon Mar 3, 2025
Does this only happen if the context menu is already open when you right-click somewhere else? That seems to be what you're doing in the video, just right-clicking a lot. So the menu is already open when you right-click, it's just being closed and reopened in a new location. Can you try it without that? Like fully close the context menu before reopening it. That would likely narrow down the issue.
I'm also noticing your context menu appearance is very different from vanilla. Have you reproduced this issue with just the script on vanilla firefox? And what is the value of the preference
browser.display.windows.non_native_menus?VitalSkib commentedon Mar 3, 2025
Hello again and thanks for the reply.
Oh, does it look like I'm clicking too fast? Sorry about that.
Well, this happens in normal mode (at normal speed, so to speak) of use while I'm browsing normally, that's why I notice it, and it's annoying.
So I decided to look for the problematic script, CSS rule or setting by disabling one by one.
And it turned out that if I exclude this script the menu starts working as it should, but I lose the nice animation.
That's why I'm here in the first place.
I'm not saying that it's this script specifically, I don't really understand it and can't say for sure.
It could also be a combination of some setting with this script.
Because, as you noted, my Firefox is quite customized.
I'll definitely test this on the vanilla version with just the script installed.
browser.display.windows.non_native_menus - 1
aminomancer commentedon Mar 3, 2025
I understand, I'm just trying to understand if it has to do with the menu closing and opening at the same time. So just close the menu before opening it again so I can see if it still happens. You can close the menu with Escape key or by just left-clicking outside of it.
VitalSkib commentedon Mar 3, 2025
Yeah, I tested it on a new clean profile where only the fx-autoconfig and the animateContextMenus.uc.js script were installed and it looks like the menu animation works fine.
At least I couldn't reproduce this glitch no matter how hard I tried.
So it looks like something else is interfering and conflicting.
Well, I'll have to try and eliminate one by one.
Any guesses as to what it could be?
I mean, based on your experience, is it more likely some other script, CSS rule or program preferences?
tia
This is what I have in my JS folder, if that makes sense:

VitalSkib commentedon Mar 3, 2025
This is what I see if I do: right click -> Esc and so on repeating in a circle.
2025_03_03.mp4
aminomancer commentedon Mar 3, 2025
Well I wouldn't expect you to see an animation issue if you uninstall this script, since there is no animation at all without the script. What I'm wondering is whether some other script or CSS you have installed is interacting with my script. Two scripts can work fine on their own, but when combined, you can have issues. Same with CSS. So that's why I want to know whether you still see the problem on a "clean" profile that has no other scripts or CSS other than this one. It's all I can really do to debug, since I haven't been able to reproduce the problem on my own setup.
VitalSkib commentedon Mar 3, 2025
Yes, I understand that and what you've already written gives some food for thought.
At least now I know that the script itself works and it's not related to any updates or changes in latest Firefox.
Although, I must say that I've been using this setup for quite a long time and everything worked without glitches before.
And only recently, about a week or two ago, I began to notice this bad behavior.
So who knows.
Thanks anyway, I'll look for the conflicting part, and if I can find a solution, I'll write here for information for those who may encounter such a problem.