<?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>201770</bug_id>
          
          <creation_ts>2019-09-13 13:49:34 -0700</creation_ts>
          <short_desc>PointerEvent.buttons incorrect on touch move</short_desc>
          <delta_ts>2019-09-17 07:01:37 -0700</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>Safari Technology Preview</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>199910</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ian</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>graouts</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1570694</commentid>
    <comment_count>0</comment_count>
      <attachid>378752</attachid>
    <who name="">ian</who>
    <bug_when>2019-09-13 13:49:34 -0700</bug_when>
    <thetext>Created attachment 378752
Small example reproducing the issue

In the iOS13 iPhone simulator at least, the value of the &apos;buttons&apos; property of a pointermove event generated by a moving touch is 0, but according to the W3C spec it should be 1. It appears to be 1 in Chrome (android simulator and on desktop in touch simulation mode). 

Example attached. 

This discrepancy leads to a project bug in the simulator that matches a bug on an iPad running 13.1. (I&apos;ll confirm its the same issue once I get a chance to plug the device in.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1570713</commentid>
    <comment_count>1</comment_count>
    <who name="">ian</who>
    <bug_when>2019-09-13 14:37:17 -0700</bug_when>
    <thetext>In iPad OS 13.1 on a 2018 iPad pointermove.buttons also reads as 0 when caused by a touch. 

Also in the iOS13 iPhone simulator, pointermove events are dispatched continuously even if the mouse isn&apos;t moving. This is not the case in 13.1 on the iPad.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1571062</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-09-16 03:49:59 -0700</bug_when>
    <thetext>&lt;rdar://problem/55394548&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1571079</commentid>
    <comment_count>3</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2019-09-16 06:40:55 -0700</bug_when>
    <thetext>This *should* work but clearly doesn&apos;t.

static unsigned short buttonsForType(const AtomString&amp; type)
{
    // We have contact with the touch surface for most events except when we&apos;ve released the touch or canceled it.
    return (type == eventNames().pointerupEvent || type == eventNames().pointeroutEvent || type == eventNames().pointerleaveEvent || type == eventNames().pointercancelEvent) ? 0 : 1;
}

This should return 1 for pointermove.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1571518</commentid>
    <comment_count>4</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2019-09-17 07:01:37 -0700</bug_when>
    <thetext>This actually works on ToT, this is a dupe of https://bugs.webkit.org/show_bug.cgi?id=199910. However, this landed too late to make it into iOS 13. It will be picked up for an upcoming software update, but I can&apos;t comment as to when.

*** This bug has been marked as a duplicate of bug 199910 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>378752</attachid>
            <date>2019-09-13 13:49:34 -0700</date>
            <delta_ts>2019-09-13 13:49:34 -0700</delta_ts>
            <desc>Small example reproducing the issue</desc>
            <filename>pointer-move-buttons.html</filename>
            <type>text/html</type>
            <size>498</size>
            <attacher>ian</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KCTx0aXRsZT48L3RpdGxlPgoJPHN0eWxlIHR5
cGU9InRleHQvY3NzIj4KCQlkaXZ7CgkJCXdpZHRoOjEwMHB4OwoJCQloZWlnaHQ6MTAwcHg7CgkJ
CWJhY2tncm91bmQtY29sb3I6IGJsYWNrOwkJCQoJCX0KCQkqeyB0b3VjaC1hY3Rpb246IG5vbmU7
IH0KCTwvc3R5bGU+CjwvaGVhZD4KPGJvZHk+Cgk8ZGl2PjwvZGl2PgkKPC9ib2R5Pgo8c2NyaXB0
IHR5cGU9InRleHQvamF2YXNjcmlwdCI+CgkJCQkKCQl2YXIgY2FwdHVyZUlEID0gbnVsbDsKCQls
ZXQgZGl2ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiZGl2IikJCgkJZGl2LmFkZEV2ZW50TGlz
dGVuZXIoInBvaW50ZXJtb3ZlIiwoZSk9PnsJCQkKCQkJY29uc29sZS5sb2coImV2ZW50LmJ1dHRv
bnMgc2hvdWxkIGJlIDEgZm9yIGEgdG91Y2guIGFjdHVhbCBldmVudC5idXR0b25zIHZhbHVlIGlz
ICIgKyBlLmJ1dHRvbnMpCQkJCgkJfSkKCTwvc2NyaXB0Pgo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>