New issue
Advanced search Search tips

Issue 670739 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Middle click event is not triggered

Reported by jasonsav...@gmail.com, Dec 2 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36

Steps to reproduce the problem:
1. Add an event listener for the click event: window.addEventListener("click", function(event) {alert("button clicked");})
2. Use the middle click on the mouse
3. 

What is the expected behavior?
An alert should be displayed.

What went wrong?
Chrome updated to v55

Did this work before? Yes 54

Chrome version: 55.0.2883.75  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0

The left click still works with this code, the issue is only with the middle click.
 
Cc: pbomm...@chromium.org gov...@chromium.org mmoss@chromium.org nzolghadr@chromium.org
Components: -Blink Blink>Input
Labels: M-55 ReleaseBlock-Stable
Status: Available (was: Unconfirmed)
Able to reproduce the issue on latest Chrome Stable and Beta channels i.e., 55.0.2883.75 on Windows 7, 10, working on Bisect range will update the CL soon.

Labels: Needs-Bisect
Labels: auxclick Hotlist-Input-Dev
Owner: nzolghadr@chromium.org
Status: WontFix (was: Available)
This behavior changed in Chrome 55. From now on we send click event for primary button of the input device only. In the case of mouse it will be left button. For non-primary buttons we send a new event called "auxclick".

https://developers.google.com/web/updates/2016/10/auxclick
Please find the bisect result :
You are probably looking for a change made after 417052 (known good), but no lat
er than 417053 (first known bad).
CHANGELOG URL:
https://chromium.googlesource.com/chromium/src/+log/3eda8caca348d8c2c2f72d28af48e0757f83d1f2..7be81ca9b22fe6abb5a96d200f77167cae987b5f
I forgot to ask. Is there a particular website broken as the result or is it just new developments looking for such event. If it just new developments you can use auxclick event for non-primary clicks.
Thank you, the auxclick will work, I wish the change was documented somewhere beforehand.

FYI: My Checker Plus for Gmail and other extensions have been using click event for years now to detect the middle click and will have to be updated.
We tried our best to make public announcements for this. But I guess we still missed some developers. We are sorry about it.
Thanks for taking the time to update your extensions. We had to move forward with the auxclick issue as there were more pros compared to cons of this change as explained in  crbug.com/255 .

Also worth mentioning that the spec for this event is here at the moment:
https://wicg.github.io/auxclick/

and remember that auxclick is dispatched for the click action of any non-primary button. So if you are particularly looking to handle the middle button you need to check for the button attribute of the event like the samples show in the spec.

Sign in to add a comment