Closed Bug 1686045 Opened 4 years ago Closed 4 years ago

Middle-clicking links on DuckDuckGo search result triggers popup blocker

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

VERIFIED FIXED
86 Branch
Tracking Status
firefox86 --- verified
firefox87 --- verified

People

(Reporter: saschanaz, Assigned: edgar)

References

(Depends on 1 open bug)

Details

Attachments

(2 files)

  1. Open https://duckduckgo.com/?t=ffab&q=mozilla&ia=web
  2. Middle-click the description part, not the title of the search results

Expected: A tab should be opened
Actual: The popup blocker prevents it

Hey Emilio, I saw your recent work on transient activation, is this something still interests you?

Depends on: 1656444
Flags: needinfo?(emilio)

This is because duckduckgo is opening the window on a mousedown event. The popup blocker in GetEventPopupControlState determines that mousedown isn't allowed to open the popup (see the popup_allowed_events pref), and thus blocks it.

So in order to fix it we could add mousedown to the events, or duckduckgo could change their event handler to use click or mouseup.

Olli, Masayuki, do you have context on why we block popups on mousedown? I guess it could be annoying if we allowed it on the primary button because it could prevent selection or something, but other than that, for middle-click at least it probably should be allowed?

Flags: needinfo?(masayuki)
Flags: needinfo?(emilio)
Flags: needinfo?(bugs)

I don't know.

But according to UserActivation.cpp, mousedown is treated as a user activating action. So, it seems that popup blocker should also allow it.

Edgar?

Flags: needinfo?(masayuki) → needinfo?(echen)

I guess we could at least allow popup for mousedown on middle-button.

Assignee: nobody → echen
Flags: needinfo?(echen)
Flags: needinfo?(bugs)
Severity: -- → S3
Priority: -- → P2

And add more tests for different button value.

We allow popups on middle button for mouse events, pointer event should just be
consistent with mouse event.

Depends on D101507

Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ff2125f9ab0
Part 1: Rewrite popup blocker tests for mouse/pointer event; r=smaug
https://hg.mozilla.org/integration/autoland/rev/3d3c6b9521dc
Part 2: Allow popups from mousedown and pointerdown events; r=smaug
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Depends on: 1686662
Flags: qe-verify+

Successfully reproduced the issue on Firefox 86.0a1 (2021-01-11) under macOS 10.15.7 following the steps from Comment 0.

The issue is fixed on latest Nightly 87.0a1 (2021-02-03) and Firefox 86.0b5. Tests were performed on macOS 10.15.7, Ubuntu 20.04 and Windows 7.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: