Skip to content

[BUG] animateContextMenus.uc.js started flickering sometimes #111

Open

Description

@VitalSkib
_2025_03_03.mp4

Link to the file containing the bug
https://github.com/aminomancer/uc.css.js/blob/master/JS/animateContextMenus.uc.js

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.

Activity

  1. added
    bug
    on Mar 3, 2025
  2. aminomancer commented on Mar 3, 2025

    @aminomancer
    Owner

    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?

  3. VitalSkib commented on Mar 3, 2025

    @VitalSkib
    Author

    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

  4. aminomancer commented on Mar 3, 2025

    @aminomancer
    Owner

    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.

  5. VitalSkib commented on Mar 3, 2025

    @VitalSkib
    Author

    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:
    Image

  6. VitalSkib commented on Mar 3, 2025

    @VitalSkib
    Author

    You can close the menu with Escape key or by just left-clicking outside of it.

    This is what I see if I do: right click -> Esc and so on repeating in a circle.

    2025_03_03.mp4
  7. aminomancer commented on Mar 3, 2025

    @aminomancer
    Owner

    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.

  8. VitalSkib commented on Mar 3, 2025

    @VitalSkib
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions