New issue
Advanced search Search tips

Issue 625847 link

Starred by 9 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Exp-Leadership: ----
Launch-Leadership: ----
Launch-Legal: ----
Launch-M-Approved: ----
Launch-M-Target: ----
Launch-Privacy: ----
Launch-Security: ----
Launch-Test: ----
Launch-UI: ----
Rollout-Type: ----

Blocking:
issue 255
issue 645427
issue 645865



Sign in to add a comment

Adding a new event type "auxclick" for non-primary button click events

Project Member Reported by nzolghadr@chromium.org, Jul 5 2016

Issue description

Following the restriction of click events to primary buttons there are particularly some usecases that were made impossible to do like preventing opening a new tab when user middle clicks on a link.

So we introduce the "auxclick" event (similar to click event structure) to be dispatched only in the case of non-primary button clicks and associate the default behaviors like opening a new tab to that.

https://discourse.wicg.io/t/new-event-for-non-primary-button-click/1527
 
Labels: -Type-Bug Type-Launch-OWP
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6efe6e4b42ab875fee4ed7029f693fefc04c2658

commit 6efe6e4b42ab875fee4ed7029f693fefc04c2658
Author: nzolghadr <nzolghadr@chromium.org>
Date: Mon Aug 15 18:56:40 2016

Start sending auxclick instead of click for non-primary buttons

Stop sending dblclick and click evnt for non-primary buttons
and send auxclick event for the click action of non-primary
buttons.

BUG= 625847 ,  255 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

TBR=dglazkov@chromium.org, holte@chromium.org

Review-Url: https://codereview.chromium.org/2163893003
Cr-Commit-Position: refs/heads/master@{#412005}

[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/chrome/browser/resources/history/other_devices.js
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/chrome/browser/resources/md_downloads/crisper.js
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/chrome/browser/resources/ntp4/apps_page.js
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/chrome/browser/resources/ntp4/new_tab.js
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/chrome/browser/ui/browser_browsertest.cc
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/LayoutTests/fast/events/mouse-click-events-expected.txt
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/LayoutTests/fast/events/script-tests/mouse-click-events.js
[add] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/LayoutTests/virtual/stable/fast/events/mouse-click-events-expected.txt
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/Source/core/dom/GlobalEventHandlers.h
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/Source/core/dom/GlobalEventHandlers.idl
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/Source/core/events/EventTarget.cpp
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/Source/core/events/EventTypeNames.in
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/Source/core/frame/UseCounter.h
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/Source/core/input/EventHandler.cpp
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/tools/metrics/histograms/histograms.xml
[modify] https://crrev.com/6efe6e4b42ab875fee4ed7029f693fefc04c2658/ui/webui/resources/js/util.js

Status: Fixed (was: Assigned)
The fix is landed behind web-experimental-flag.
Status: Started (was: Fixed)
Blockedon: 255
Blocking: -255
Summary: Adding a new event type "auxclick" for non-primary button click events (was: Adding a new event type for non-primary button click events)
Status: Fixed (was: Started)
Labels: M-55

Comment 10 Deleted

Blockedon: -255
Blocking: 255
The "click" event is no longer dispatched for non-primary buttons as per UI events spec. This will ensure the pages that don't check the buttons attribute on their click handlers don't show unexpected behaviors when middle clicking for example.
Instead there will be new event "auxclick" event for non-primary buttons that will be useful for some apps that truly care about click action for non-primary buttons. For example in case someone wants to prevent opening a new tab when middle clicking a link or adobt any other actions on click behavior of any non-primary button. Here is the spec for the event and some examples:
https://navidz.github.io/auxclick/
nzolghadr@ Can I prevent middle-click autoscroll default behaviour?

see issue 522011
The auto scroll I believe is the action that happens after mouse down not after the click of middle button. So if anything you should prevent it on mousedown or something like that. However, if the functionality is not there I would say just comment on that bug so that while it is behind the flag we address the issue.
Blocking: 645865 645427
Labels: auxclick
Project Member

Comment 17 by bugdroid1@chromium.org, Sep 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1dbab47ab5ef1eed8da490cbddc0707ac31ac4a0

commit 1dbab47ab5ef1eed8da490cbddc0707ac31ac4a0
Author: ericwilligers <ericwilligers@chromium.org>
Date: Fri Sep 15 22:40:48 2017

Input: Retire runtime flag for auxclick

Support for auxclick shipped to stable in Chrome 55.

The runtime flag is no longer needed.

BUG= 625847 

Change-Id: Icbd4df54622fd1981ec4ae6873bfdb1b54727d90
Reviewed-on: https://chromium-review.googlesource.com/661697
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502412}
[modify] https://crrev.com/1dbab47ab5ef1eed8da490cbddc0707ac31ac4a0/third_party/WebKit/Source/core/dom/GlobalEventHandlers.idl
[modify] https://crrev.com/1dbab47ab5ef1eed8da490cbddc0707ac31ac4a0/third_party/WebKit/Source/core/input/MouseEventManager.cpp
[modify] https://crrev.com/1dbab47ab5ef1eed8da490cbddc0707ac31ac4a0/third_party/WebKit/Source/platform/runtime_enabled_features.json5

Sign in to add a comment