This repository has been archived by the owner on Nov 7, 2022. It is now read-only.
Use firefox native click behavior in versions >= 96 #338
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's my attempt at fixing #335.
Let me first explain my understanding of the issue:
MouseEvent
is sent, with "native click" behavior this should trigger the browser to open up a tab in the background, foreground, new window.This is an equivalent bugfix to philc/vimium#3985.
To me, it seems that
resistFingerprinting
(RFP) is a separate issue (which should only affect the subset of users which have enabled RFP). This is fixed in philc/vimium#4000. I found the Mozilla bugreport to be the most enlightening reading on the subject. AFAIU, enablingresistFingerprinting
is essentially a security measure which causes theUser-Agent
(UA) interface to spoof the Firefox version so that only a subset of Firefox versions are presented to the website. This will causes the UA-based version number check (>96.0) to become unreliable, by reporting (e.g.) v.91.x when the actual version is >v96.0.I still don't understand the
resistFingerprinting
issue deeply enough to prepare a fix. https:/github.com/philc/vimium/pull/4000 seems to add the additional check that firefox version is >91.0,<91.5, which seems perhaps an improvement, but also not 100% reliable in the non-RFP v91.x case. It also seems to make some other changes to the logic for pulling browser version info that I don't understand.Regardless, I think the bugfix in this PR is valid on it's own, as it will fix #335 for non-RFP-enabled users.
The one distasteful addition here is the duplicate reading of
navigator.userAgent.match(/\bFirefox\/(\d+)/)[1] < 96
in both files touched. Please LMK if there's a good way to avoid this, and I can submit a patch.