Repository navigation
Conversation
This could be one of the commits which fixed it: The bug is privated though: https://issues.chromium.org/issues/503371806 edit: I found a new way, I'm not sure how easy it will be to integrate though |
This kind of behavior isn't something browsers are very fond of due to abuse in the past, but I imagine you already considered that before writing the code. Are you asking for an opinion on something specific? The JS looks good to me as an implementation of what's described in the OP. |
|
As this is a bit non-standard, any chance this could be in an extension? |
The
seems like a fair change, as well as the Open in current tab option, so what exactly should be in an extension? |
|
It seems somewhat unlikely that the synthetic event will keep working that way in Firefox in the long term. |
|
I am afraid those mechanisms have been a cat/mouse game for some time and will likely continue with some instability. In particular, if possible, I would prefer code requiring user-agent detection to be in an extension. |
It doesn't require user agent detection, it's just for clarity. I can remove it, and the code will continue to fallback to opening in a new tab (not in background if not supported) |
So it is a bug in Firefox, but maybe an intended one.
The code change that was made: https://phabricator.services.mozilla.com/D131868#differential-review-stage Potentially, the unintended part is that now untrusted events can trigger such clicks (with Ctrl key), but it is not checked if Ctrl is actually being pressed, unlike in Chrome. This is working for 4 years now though. |
It looks like the problem was about opening in a new tab, not the background part, was it? In our case, isn't it solely the background part that does not exist? |
|
Apparently they're no rush (16 years and counting), but they didn't reject it… https://bugzilla.mozilla.org/show_bug.cgi?id=565104 |
|
I made a minimal PR only for the modifiers change: #9186 I will probably turn the rest of this PR into an extension, as suggested: #8990 (comment) |
Minimal changes borrowed from #8990 Allows usage of <kbd>Ctrl/Shift</kbd> keys with the open website shortcut, so that you can open an article either in a new background tab or a new window. Doesn't work in Chromium browsers, the website opens normally in a new tab there instead. (Firefox only)
Closes #1256 (Safari not tested/implemented)
Solves it by:
Open in new background tab, in this case, which can be applied either only to the shortcut or both shortcut and button. Also works only on Firefox.I tried to make the option work on Chromium too, but the method I found for doing that was patched recently in v150:
https://gist.github.com/Inverle/d79be2c30ed9b5b2aba8e09c507a4ea9
new: https://gist.github.com/Inverle/27dee6e393e2d165e429f0464cccf83f
(and when I found it, I was running an outdated version of Chromium, so this is quite unlucky - the first stable build with the fix was released 2026-06-30, so basically 5 days ago..)
edit: I found a new way, I'm not sure how easy it will be to integrate though
In addition:
Open in new tab(already default) /Open in current tab