Middle mouse click on a result link of DuckDuckGo not only opens the link but also causes auto-scrolling
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
People
(Reporter: alice0775, Assigned: masayuki)
References
Details
(Keywords: nightly-community)
Attachments
(1 file)
Reproducible: always
Steps to Reproduce:
- Open https://duckduckgo.com/?t=ffab&q=mozilla&ia=web
- Middle-click the description part, not the title of the search results
Actual results:
The link open in background tab as expected.
However, It also causes auto-scrolling.
Expected results:
If the user event opened the link, it shouldn't trigger auto-scrolling.
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=1aff06604426eae04041386d1b2d9443f0a99d69&tochange=3d3c6b9521dca33b6367571bb5012062e976c922
Comment 1•4 years ago
|
||
This also happens before Bug 1686045 if the user allows the website to open a popup.
![]() |
Reporter | |
Comment 2•4 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #1)
This also happens before Bug 1686045 if the user allows the website to open a popup.
yes.
Comment 3•4 years ago
|
||
This seems vaguely related to bug 1528289 and bug 1521396.
Hi Masayuki, do you happen to have some quick idea here?
Assignee | ||
Comment 4•4 years ago
|
||
Hmm, I have a patch for bug 1528289, but does not have automated tests because of test framework issue, IIRC.
I'll take a look whether we can land it.
Assignee | ||
Comment 6•4 years ago
|
||
This does not depend on bug 1528289, but I got the reason why this occurs.
First, this is a bug of DuckDuckGo. It handles the middle button click as opening related link of the paragraph in new window by themselves. However, they don't prevent its default. Therefore, we set focus to the clicked point and window as default action of a middle click. Therefore, the old tab gets back focus after opening a new tab. On the other hand, in this case, Blink does not set focus to the clicked window. This incompatible behavior is the other cause of this bug.
Assignee | ||
Comment 7•4 years ago
|
||
AutoScrollParent
starts autoscroll even if the requested tab has already
been in background tab. In this case, it does not make sense to start
autoscrolling in new foreground window since it may not be scrollable.
Additionally, our mousedown
event default action activates the DOM window,
but in the DuckDuckGo's case, focus shouldn't be backed to the clicked tab.
Depends on D104652
Comment 9•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Updated•4 years ago
|
Description
•