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

fix opening links twice when privacy.resistFingerprinting is enabled or on Firefox 91.6+ #4000

Merged
merged 3 commits into from
May 22, 2022

Conversation

gdh1995
Copy link
Contributor

@gdh1995 gdh1995 commented Jan 30, 2022

As said in #3989 (comment), Firefox will report a version of "91.0" in navigator.userAgent, if only privacy.resistFingerprinting on about:config is enabled.

This bug is reported in #3989 (comment) and #3964 (comment).

And #3985 (comment) reported Firefox 91.6.0 ESR has updated its blocking policy and then Vimium opens 2 tabs on it again. The latest commit adds support for this special case.

This also fixes #4021 and fixes #4032.

====

Updated on 2022/08/09:
I was still curious about why it's Firefox 96 which began to behave differently, so according to the clue about Firefox 91.6.0esr, today I compared 91.5.1esr and 91.6.0esr and successfully found the root difference.

It's the bug fix of https://bugzilla.mozilla.org/show_bug.cgi?id=1739929 from Firefox team, and it's imported to make GMail work on it. Sadly to learn that complaints from us extension developers didn't make any contribution in it.

Firefox will report a version of "91.0" in `navigator.userAgent`,
if only `privacy.resistFingerprinting` on `about:config` is enabled.

Then this commit fixes this.
@gdh1995 gdh1995 changed the title Recognize ff version fix opening links twice when privacy.resistFingerprinting is enabled Jan 30, 2022
@gdh1995 gdh1995 changed the title fix opening links twice when privacy.resistFingerprinting is enabled fix opening links twice when privacy.resistFingerprinting is enabled and on Firefox 91.6.0 Feb 22, 2022
@gdh1995 gdh1995 changed the title fix opening links twice when privacy.resistFingerprinting is enabled and on Firefox 91.6.0 fix opening links twice when privacy.resistFingerprinting is enabled or on Firefox 91.6.0 Feb 22, 2022
@ashuradji
Copy link

ashuradji commented Feb 23, 2022

Sad this isn't already merged 😢

@woky
Copy link

woky commented Mar 12, 2022

I've just tested this, and it fixes the problem with opening new tab twice in current Firefox ESR (91.7.0esr). Thank you!

There's still one minor difference when privacy.resistFingerprinting is enabled compared to when it's disabled (in Firefox ESR). When it's disabled, you can press Shift when either when opening hits, that is Shift-F, your you can press Shift at last letter, i.e. when link letters are SSA, the following key press sequences open the link in a new tab:

  1. Shift+F, S, S, A
  2. F, S, S, Shift+A
  3. F, S, Shift+S, Shift+A
  4. F, Shift+S, Shift+S, Shift+A

When privacy.resistFingerprinting is enabled, only the first one works though. I'm not sure if the other cases are supposed to work or it is just a side effect, but I got quite used to it. It's no big deal though.

@gdh1995
Copy link
Contributor Author

gdh1995 commented Mar 12, 2022

@woky It's another impact of resistFingerprinting - it blocks Ctrl/Shift/Alt key events and then LinkHints's won't learn you have pressed Shift+S or Shift+A. In Normal mode, Vimium uses another way to check Shift, so Shift+F still works.

My extension, Vimium C (https://github.com/gdh1995/vimium-c) is also affected, and I've implemented a working around for this issue in the master branch (though not released yet). You may take a try or just wait for a few weeks to try Vimium C v1.97+ .

I have no plans to file new PRs to add the working around into Vimium, because: 1) there're no other people reporting this, so this bug seems insignificant; 2) I suspect there're still other impacts of resistFingerprinting

@gdh1995 gdh1995 changed the title fix opening links twice when privacy.resistFingerprinting is enabled or on Firefox 91.6.0 fix opening links twice when privacy.resistFingerprinting is enabled or on Firefox 91.6+ Mar 12, 2022
@philc philc merged commit d908ee1 into philc:master May 22, 2022
@philc
Copy link
Owner

philc commented May 22, 2022

Tricky and complex, unfortunately =( Thanks for adding this @gdh1995

@gdh1995
Copy link
Contributor Author

gdh1995 commented Aug 19, 2022

Hello, as I've updated in #3985 (comment) , I find a new failure on Firefox 91.6+ ESR - if only Settings -> Privacy & Security -> Block pop-up windows is enabled, "a plain click on <a target=_blank href=...>" will still be blocked; while Firefox 96+ doesn't have such a problem.

However, Firefox 102.2 ESR is arriving in the end of this August, and then Mozilla's support for Firefox 91 ESR will end. So we may just ignore this minor issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using F to open a link in a new tab does so twice Open a link with uppercase caused two same tabs opened
4 participants