<?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>214609</bug_id>
          
          <creation_ts>2020-07-21 11:55:19 -0700</creation_ts>
          <short_desc>Safari on iOS fires &quot;pointerenter&quot; with mouse pointerType in addition to touch</short_desc>
          <delta_ts>2026-01-27 06:20:55 -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>Safari 13</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=210716</see_also>
          <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 name="Devon Govett">govett</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>rsnow</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
    
    <cc>yivarak978</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1673549</commentid>
    <comment_count>0</comment_count>
    <who name="Devon Govett">govett</who>
    <bug_when>2020-07-21 11:55:19 -0700</bug_when>
    <thetext>When you have an element with a `tabIndex`, Safari on iOS fires the &quot;pointer enter&quot; and &quot;pointerleave&quot; events twice: once with `pointerType` set to &quot;touch&quot;, and again with `pointerType` set to &quot;mouse&quot;. After touching and releasing the element, the events fired are:

* pointer enter: pointerType = &quot;touch&quot;
* pointer leave: pointerType = &quot;touch&quot;
* pointer enter: pointerType = &quot;mouse&quot;

A pointer leave event with pointerType = &quot;mouse&quot; is not fired until the element is blurred (e.g. by tapping on something else that&apos;s focusable). Based on this information, it appears that focus/blur events are also causing pointer enter/pointer leave events.

You can try this out in a demo here: https://codepen.io/devongovett/pen/QWyYWYa</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1673598</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-07-21 13:28:24 -0700</bug_when>
    <thetext>&lt;rdar://problem/65899993&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1673623</commentid>
    <comment_count>2</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2020-07-21 14:30:06 -0700</bug_when>
    <thetext>&gt; * pointer enter: pointerType = &quot;touch&quot;
&gt; * pointer leave: pointerType = &quot;touch&quot;
&gt; * pointer enter: pointerType = &quot;mouse&quot;

These seem like events that would be fired when dispatching synthetic click events, which should be fixed in the iOS 14 beta.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896068</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-03 14:01:21 -0700</bug_when>
    <thetext>I am unable to reproduce this bug using iOS 15.6.1 on iPhone 13 Pro Max and it does not show ‘mouse’ with positionenter in the demo from Comment 0.

@Devon - if it is reproducible, appreciate if you can share updated testcase. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896581</commentid>
    <comment_count>4</comment_count>
    <who name="Devon Govett">govett</who>
    <bug_when>2022-09-06 15:53:34 -0700</bug_when>
    <thetext>I can confirm that it appears to be fixed in the latest iOS version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2175323</commentid>
    <comment_count>6</comment_count>
    <who name="Rob Snow">rsnow</who>
    <bug_when>2026-01-26 19:01:13 -0800</bug_when>
    <thetext>There seems to be a related issue in iOS 26. I can open another issue if that&apos;s preferred.
https://codepen.io/snowystinger/pen/OPXOOGO

To reproduce, touch the &quot;x&quot;, which will be removed when the checkbox is checked.

When you have an element that is removed in the midst of an onChange, pointerLeave is fired with `pointerType` set to &quot;mouse&quot;.

It may be fired twice, with a preceding event with `pointerType` set to &quot;touch&quot;. Depends on how far off to the right side you are.

These are the possible leave event scenarios:

* pointer leave: touch
* pointer leave: mouse

or just
*pointer leave: mouse</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>