-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
not prevent click events since Firefox 96 #3985
Conversation
It seems Firefox 96 allows extensions to trigger native click behaviors. See philc#3964 for reports. Although this is not listed in https://www.mozilla.org/en-US/firefox/96.0/releasenotes/, I think it's safe enough to skip preventing since Firefox 96.
Great Dahan! I'll look at this shortly.
…On Sat, Jan 15, 2022 at 3:05 AM, NPowDev < ***@***.*** > wrote:
***@***.**** approved this pull request.
—
Reply to this email directly, view it on GitHub (
#3985 (review) ) ,
or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AAACDFRSVX7XONBBWSPD4DLUWFIIJANCNFSM5L34BGIA
).
Triage notifications on the go with GitHub Mobile for iOS (
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
) or Android (
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub
).
You are receiving this because you are subscribed to this thread. Message
ID: <philc/vimium/pull/3985/review/853538453 @ github. com>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine to me. I also pulled this down and can confirm that it resolved the issue for me in Firefox 97.
@gdh1995 MVP -- thanks Dahan! |
This is still happening for me in firefox v.96 and vimium 1.67.1 |
There's no problem in Firefox 97.0.1 and Vimium 1.67.1, but the issue (using F, af, or et opens links twice) is still happening in Firefox ESR 91.6.0 and Vimium 1.67.1, even when privacy.resistFingerprinting is disabled. |
@xbsuser5143 Confirmed. This has only occurred since Firefox 91.6.0 esr (but not 91.5.0), so I've updated #4000 to fix this case. |
It seems Firefox 96 allows extensions to trigger native click behaviors.
See #3964 for reports.
Although this is not listed in https://www.mozilla.org/en-US/firefox/96.0/releasenotes/,
I think it's safe enough to skip preventing since Firefox 96.
This will fix #3964, fix #3979, fix #3986 and fix #3579 (comment)
====
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 in #4000, 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.
On Firefox 91.0, there're two chains handling click events on
<a>
:Node::DispatchEvent
PopupBlocker::openAbused
returned byPopupBlocker::GetEventPopupControlState(untrusted-click)
is pushedHTMLAnchorElement::PostHandleEvent
->nsGenericHTMLElement::PostHandleEventForLinks
Element::PostHandleEventForLinks
Dispatch
a non-trustableDOMActivate
eventDOMActivate
event is prevented, abortElement::PostHandleEventForLinks
againnsContentUtils::TriggerLink(..., click=true, trusted=false)
nsDocShell::OnLinkClick
creates anOnLinkClickEvent
instance and dispatches itnsDocShell::OnLinkClickSync
callsnsDocShell::InternalLoad
, and go tonsGlobalWindowOuter::OpenInternal
RevisePopupAbuseLevel(openAbused)
callsIsPopupAllowed
->CanShowPopup
WindowContext::CanShowPopup
returns! getPerf("dom.disable_open_during_load")
DOMActivate
event andclick
events are markedeConsumeNoDefault
eConsumeNoDefault
, then stopClickHandlerChild
, and it sends a json namedContent:Click
with modifier informationBrowserGlue.jsm:ClickHandler
wantUntrusted: true
intoClickHandler
, so events workOn Firefox 96+, there's an extra logic:
browser.runtime.Port::onMessage
, then pushopenAllowed
oropenControlled
GetEventPopupControlState
returnsopenAbused
, it won't be pushed when buildingAutoPopupStatePusher
RevisePopupAbuseLevel
in the above 4.a.7 will return allowing.<a target=_blank href>
whendom.disable_open_during_load
istrue
"====
The
dom.disable_open_during_load
can be enabled byPrivacy & Security -> Block pop-up windows
onabout:preferences
.