Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key bindings lost on update. #1477

Closed
zelch opened this issue Feb 22, 2024 · 5 comments
Closed

Key bindings lost on update. #1477

zelch opened this issue Feb 22, 2024 · 5 comments

Comments

@zelch
Copy link
Contributor

zelch commented Feb 22, 2024

Steps to reproduce

Have active key maps.

Let Firefox update Sideberry automatically in the background.

Expected behavior

Everything keeps working.

Actual behavior

All of the keybindings stop working in currently open windows.

If you open a new window, that will have functional keybindings.

Likewise, if you close Firefox and restart, that will also fix things.

But rebinding in settings does not work, that is, it can happily pickup the keys that you're trying to bind, but if it is the same binding they still don't work.

If it is an entirely new key sequence that has never been bound to something, it works just fine.

I'm not sure how to trigger the same update flow manually, or I would spend some time debugging it.

Looking through the code, I don't see how new bindings would be working at all if our listener (keybindings.setupListeners and keybindings.resetListeners) had gotten lost.

Hitting reset addon isn't enough to fix things, same with 'Reset Keybindings'.

Same with exporting the keybindings and reimporting them.

So without being able to reproduce this at will, I'm not sure how to debug this further.

@zelch
Copy link
Contributor Author

zelch commented Feb 22, 2024

I am no longer certain that this isn't a straight Firefox bug.

Debugging the extension while in the broken state shows that we should be getting everything for the key bindings in question, browser.commands has them, with the correct shortcuts, and onCmd is properly registered.

But for key sequences that were bound before the extension upgrade, we just don't get called.

@visua0
Copy link

visua0 commented Feb 22, 2024

Looks like the same thing I run into: #1470
Indeed it appears to be happening during the daily update since I'm on the nightly version. Gonna switch to the stable release for the time.
Still not sure how the blank sidebars fit in. Sometimes it happens at the same time and sometimes it happens on launching firefox.

@mbnuqw
Copy link
Owner

mbnuqw commented Feb 23, 2024

Finally, I've managed to reproduce this Firefox bug! Thanks, @zelch and @visua0!
Bugzilla link: https://bugzilla.mozilla.org/show_bug.cgi?id=1881820

@megamorphg
Copy link

@visua0 I've been having this issue the past 2 weeks too, likely after one of the recent Firefox upgrades. Glad this isn't caused by any of the Firefox scripts I have or Sidebery. I'm currently on the latest 123... did you say you're not having the issue in a different version?

Also, it only affects keybindings for Sidebery. Are we sure it isn't something Sidebery related? I can use ATD shortcut to discard current tab or open history sideview with Ctrl + H.

@mbnuqw
Copy link
Owner

mbnuqw commented Feb 25, 2024

The issue only occurs if the addon runs command listener in the sidebarAction, so if the Bugzilla ticket doesn't attract attention, I'll just move the logic of keybindings to background. That was planned anyway (partially).

@mbnuqw mbnuqw closed this as completed in 403f33d Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants