-
Notifications
You must be signed in to change notification settings - Fork 81
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
Firefox Nightly changes uBlock Origin extension shortcut on restart #836
Comments
Because it's Command on Mac OS instead of CTRL key , -- gorhill/uBlock#614 Isn't that so ? |
How did you do this? |
Hi @gorhill , I set it from the about:addons, by clicking on the gear icon on the right and choosing Manage Extension Shortcuts: You can see in this current screenshot, Firefox Nightly always defaults the CTRL to CMD after a restart: However, uBlock Origin does register it as CTRL+A: |
uBO's own shortcut UI is unreliable on MacOS, there is an open issue about this, which really I should close because that UI exists only as a crutch for when there was no Firefox UI to set the shortcut. Now that there is a Firefox UI to set shortcut, use it, and if ever you find that it does not function according to your expectations, open a Firefox issue about it. |
I actually set the shortcut with the Firefox interface, never did it with uBlock Origin. It looks like uBlock Origin is functioning more correctly than Firefox since it does register the shortcut! I'll open the Firefox issue. I did think it was a Firefox problem but when I initially posted it on /r/Firefox, they suggested I open an issue here. Thanks @gorhill ! |
I linked to the wrong uBO issue above, this is the right one: #628. uBO's own UI is not able to input Mac command key-based shortcuts, see #106 (comment). But as said, shortcuts entered using Firefox's own UI should work, uBO does not handle or even care about what the shortcuts are, it just register a listener to be called when Firefox detects that the shortcut has been triggered. |
Hmmm interesting that Firefox can't allow CMD as custom shortcut modifier. However, CMD+A which "Selects All" on a page, does work within Firefox; but this is probably an OS-level shortcut that Firefox is simply respecting. I'm trying to set CTRL as the modifier though, so perhaps this is the culprit that #106 mentions:
I never knew that but that would explain why Firefox keeps saving CTRL+A as CMD+A. I've opened an issue at Firefox here. |
Right, if I try to enter Probably uBO is displaying |
Hi @gorhill , were you able to replicate this? Someone over at Firefox looked at the issue and is saying they can't replicate it. |
I don't have a MacOS computer, it's not possible for me to try to replicate. |
Ok. They might have some insight over at Firefox, this was the question posed:
I wonder if there're some "signals" getting mixed in there. |
Further troubleshooting: By setting CTRL+A in Firefox UI and NOT OPENING uBlock UI ever, the shortcut persists between restarts. So I'm thinking, somehow, after setting it in Firefox (which actually registers CTRL as MacCtrl), opening uBlock UI, uBlock displays it as CTRL and somehow, that gets parsed back to Firefox as CTRL who then misinterprets it as CMD. I think you mentioned uBlock's UI doesn't actually do anything with shortcuts and is only reading what's set with Firefox UI, but somehow uBlock displaying it seems to be affecting how Firefox registers the shortcut. It's the only theory I have to explain this odd behavior I described above. |
Hi @gorhill : So after some discussion over at Firefox, we're thinking this might be a uBlock issue because it's registering CTRL as CTRL instead of MacCtrl because Firefox interprets CTRL as CMD. Confusing as hell.
|
Why are you using uBO's UI to set shortcuts? I said above that it's unreliable on MacOS and that you should be using Firefox's built-in UI for setting shortcuts. |
I'm not, that was someone else's understanding of the issue. So far what I mentioned in this comment is what's happening. Since setting the shortcut in Firefox, the shortcut has been fine as long as I don't open uBlock's UI. I don't have a logical explanation for what I've observed. |
Ok I think we can finally resolve this, sorry for all the back and forth. Ctrl+A set in Firefox UI, will appear as MacCtrl+A in uBlock UI: At some point when I was troubleshooting before opening this issue, I must've entered Ctrl+A into uBlock's UI and since then, it had persisted as Ctrl+A within uBlock which Firefox interprets as Cmd+A, DESPITE entering Ctrl+A into Firefox later. So that's user error on my part for entering CTRL+A with uBlock. The odd behavior is subsequent entering of CTRL+A into Firefox did not change CTRL+A to MacCtrl+A in uBlock, uBlock kept it as Ctrl+A which Firefox converts to Cmd+A every restart. While troubleshooting, I wiped all the keyboard shortcuts and only set it within Firefox. This seems to work as you said now. SUGGESTION:
|
Prerequisites
Description
I set CTRL+A as the extension keyboard shortcut for uBlock Origin's "Relax blocking mode".
A specific URL where the issue occurs
https://www.reddit.com/r/firefox/comments/eit67e/firefox_nightly_mac_extension_keyboard_shortcut/
Steps to Reproduce
Expected behavior:
CTRL+A should trigger Relax blocking mode.
Actual behavior:
Nothing happens because it's mysteriously changed to CMD+A. This happens on every restart of Firefox Nightly.
Your environment
The text was updated successfully, but these errors were encountered: