<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>166849</bug_id>
          
          <creation_ts>2017-01-09 10:20:18 -0800</creation_ts>
          <short_desc>Consider implementing auxclick event</short_desc>
          <delta_ts>2017-01-19 17:36:01 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>Other</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>22382</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Navid">nzolghadr</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>darin</cc>
    
    <cc>dave+webkit</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1265043</commentid>
    <comment_count>0</comment_count>
    <who name="Navid">nzolghadr</who>
    <bug_when>2017-01-09 10:20:18 -0800</bug_when>
    <thetext>There was a new event proposed for non-primary button click actions called &quot;auxclick&quot; [1] and to dedicate the &quot;click&quot; event only to the primary button.

Both FireFox[2] and Chrome[3] shipped the feature. I was wondering if it is possible to have it implemented in WebKit as well.


[1] https://wicg.github.io/auxclick/
[2] https://hg.mozilla.org/mozilla-central/rev/ea7338a0b3de
[3] https://www.chromestatus.com/feature/5663174342737920

P.S. I wasn&apos;t sure if the component is correct or not. So I just picked the one that seems closest. Feel free to change the component to a more appropriate one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1265050</commentid>
    <comment_count>1</comment_count>
    <who name="David Tapuska">dave+webkit</who>
    <bug_when>2017-01-09 10:29:15 -0800</bug_when>
    <thetext>@cdumez: Chris do you have any position on this request?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1265052</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2017-01-09 10:49:52 -0800</bug_when>
    <thetext>Seems reasonable to me, especially if Firefox / Chrome already shipped this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1265210</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2017-01-09 16:47:26 -0800</bug_when>
    <thetext>I tested the feature on Mac using:
- https://jsfiddle.net/ejxer8tt/2/

Firefox nightly does alert &quot;auxclick&quot; on two-finger click. However, it did not on Chrome Canary for some reason.

I also tested with a PC mouse (which is less common on Mac) and I got the same results when click the right button.

Seems Chrome may not support this on Mac?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1265213</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2017-01-09 16:54:57 -0800</bug_when>
    <thetext>It also seems there are some backward-compatibility risks involved since we would stop firing regular &quot;click&quot; events of non-LeftButton clicks, something existing content may rely on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1265217</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2017-01-09 17:00:30 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; It also seems there are some backward-compatibility risks involved since we
&gt; would stop firing regular &quot;click&quot; events of non-LeftButton clicks, something
&gt; existing content may rely on.

Hmm, actually https://jsfiddle.net/ejxer8tt/6/ seems to show that Safari was not fixing &quot;click&quot; events on right clicks anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1265219</commentid>
    <comment_count>6</comment_count>
    <who name="Navid">nzolghadr</who>
    <bug_when>2017-01-09 17:00:59 -0800</bug_when>
    <thetext>I double checked with Chrome. The reason you don&apos;t see this on Chrome is due to contextmenu. Context menu on Mac opens after down and so it prevents the page from seeing mouseup and then the click/auxclick. FF as oppose to Chrome does not consider the context menu as something that covers the whole page and consumes all the events.

Anyhow, beside that difference in contextmenu which I&apos;m not sure if we can solve as part of the auxclick, Chrome does send auxclick when the page receives both down and up for a non-primary button. You can see this by preventDefaulting the contextmenu event like as I did here:

https://jsfiddle.net/ejxer8tt/3/

It worked both for the two finger click on the touch pad or for a PC mouse (middle and right buttons) connected to a Mac.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1267180</commentid>
    <comment_count>7</comment_count>
    <who name="Navid">nzolghadr</who>
    <bug_when>2017-01-16 10:53:56 -0800</bug_when>
    <thetext>@Chris, did what I say address your concern? Does the proposal/spec look reasonable?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1268272</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-01-19 17:36:01 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 22382 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>