Middle-clicking on SVG <use> wrapped by <a> unexpectedly starts autoscroll
Categories
(Toolkit :: General, defect, P3)
Tracking
()
People
(Reporter: saschanaz, Assigned: Gijs)
References
Details
Attachments
(2 files)
1.52 KB,
text/html
|
Details | |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr91+
|
Details | Review |
- Make sure
general.autoScroll
is turned on (by default on Windows) - Open the attachment
- Middle-click somewhere inside the upper bird and see a new tab opens
- Middle-click somewhere inside the lower bird and see a new tab opens
Expected: Each should open a new tab
Actual: Only the lower one opens a tab, and the upper one instead starts autoscrolling
This is affected by bug 1528289 (specifically the part 4 patch) where autoscrolling prevents click event, but it really shouldn't even start autoscrolling.
Comment 1•3 years ago
|
||
How do you know middle click isn't firing? Or is it just that middle click isn't handled? That latter would be Firefox UI issue.
Reporter | ||
Comment 2•3 years ago
•
|
||
Hmm, TIL middle click on (Ah yeah because <a>
actually never fires a web-visible click event.auxclick
.) Changing the component per mozbuild.
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 3•3 years ago
|
||
(It indeed does not fire auxclick
because of autoscrolling, BTW.)
Comment 4•3 years ago
|
||
The difference in behaviour between the top image and the bottom image hinges on whether isAutoscrollBlocker returns true or false for the event's target.
This code predates APZ and I'm not really familiar with it, but based on a quick look, it looks like isAutoscrollBlocker()
walks the content tree to find an <a href>, and in the case of the first image, the target is inside the used SVG so the traversal never encounters the <a>.
So, I guess the traversal should be doing something more involved than node = node.parentNode
to handle this case?
Updated•3 years ago
|
Comment 5•3 years ago
|
||
Moving to Toolkit :: General, per discussion with Gijs about what to do with autoscroll bugs unrelated to APZ.
(ni?gijs, just in case you'd like to adjust the priority or ping someone specific, otherwise feel free to leave as P3/backlog)
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
This avoids starting autoscroll on SVG links, and on HTML links that
contain SVG, by sharing the code that browser's ClickHandlerChild uses
to detect links into BrowserUtils, and using that from AutoScrollChild
to determine if the click happened on top of a link. It also adds a
test so we avoid regressing this in future.
When running the test, I noticed an error from ClickHandlerParent
when the browser for which we receive a click has gone away, and
fixed it by adding a nullcheck and early return.
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/57d00cc40a56 fix autoscroll behaviour over various SVG elements, r=masayuki
Comment 8•3 years ago
•
|
||
Backed out for causing linting failures on browser_autoscroll_disabled_on_links.js
It also caused some bc failures on browser_autoscroll_disabled_on_editable_content.js
Failure log
Assignee | ||
Updated•3 years ago
|
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/32025eb4c69c fix autoscroll behaviour over various SVG elements, r=masayuki
Comment 10•3 years ago
|
||
bugherder |
Comment 11•3 years ago
|
||
[Tracking Requested - why for this release]:
No longer open a product in new tab with middle mouse button click on a product image of https://jp.mercari.com/.
Please up lift to 91.esr if possible.
Comment 12•3 years ago
|
||
Gijs, did you want to nominate this for uplift? It grafts cleanly.
Assignee | ||
Comment 13•3 years ago
|
||
Comment on attachment 9231441 [details]
Bug 1716883 - fix autoscroll behaviour over various SVG elements, r?masayuki
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Broken autoscroll / link behaviour for popular Japanese websites
- User impact if declined: See above
- Fix Landed on Version: 92
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Grafts cleanly, moves & reuses existing logic for link clicks in the autoscroll code to fix the bug & adds an automated test.
- String or UUID changes made by this patch: Nope
Comment 14•3 years ago
|
||
Comment on attachment 9231441 [details]
Bug 1716883 - fix autoscroll behaviour over various SVG elements, r?masayuki
Fixes a broken site in the wild and has had lots of bake time w/ automated test. Approved for 91.4esr.
Updated•3 years ago
|
Comment 15•3 years ago
|
||
bugherder uplift |
Description
•