<?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>191218</bug_id>
          
          <creation_ts>2018-11-02 16:45:20 -0700</creation_ts>
          <short_desc>Touch event not firing while scrolling is in motion</short_desc>
          <delta_ts>2026-03-30 11:01:15 -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 12</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 12</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=251513</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=310540</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="nick">starshiping</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alexander</cc>
    
    <cc>a_protyasha</cc>
    
    <cc>fred.wang</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1474676</commentid>
    <comment_count>0</comment_count>
    <who name="nick">starshiping</who>
    <bug_when>2018-11-02 16:45:20 -0700</bug_when>
    <thetext>When user scrolls and in the deceleration phase of the inertial scrolling, user touch the screen will make the scrolling stop but no &quot;touch&quot; event is fired. I&apos;d like to detect where the user touch to stop the scrolling but I can&apos;t because there&apos;s no event firing. Safari and Chrome on iphone have this issue while Android doesn&apos;t.
I&apos;ve created a CodePen for testing.
https://codepen.io/anon/pen/MzWKrM

Please help to fix this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1593466</commentid>
    <comment_count>1</comment_count>
      <attachid>384303</attachid>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2019-11-25 09:35:49 -0800</bug_when>
    <thetext>Created attachment 384303
testcase

Reproducible in iOS 13.3 17C5046a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1593688</commentid>
    <comment_count>2</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2019-11-26 08:51:09 -0800</bug_when>
    <thetext>Preliminary debugging on the simulator (public SDK):

- When you scroll and tap the blue rectangle during scrolling, WKScrollingNodeScrollViewDelegate::scrollViewDidEndDragging is called and just informs ScrollingTreeScrollingNodeDelegateIOS about the scroll &amp; scroll end.

- When you tap directly the blue rectangle, WKContentView::_singleTapGestureRecognizer will invoke WebPageProxy::commitPotentialTap in order to tell the Web process to dispatch an event.

- WKContentViewInteraction::gestureRecognizerShouldBegin has some logic when tap interrupts a scroll deceleration, but the code does not seem to be called for me.

I wonder if there is something wrong in the fact that touch gesture are not handled by WKContentView during scrolling or if the scrolling delegate should do similar work as WKContentView to recognize touch gestures.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597630</commentid>
    <comment_count>3</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2019-12-11 08:32:13 -0800</bug_when>
    <thetext>(In reply to Frédéric Wang (:fredw) from comment #2)
&gt; - When you scroll and tap the blue rectangle during scrolling,
&gt; WKScrollingNodeScrollViewDelegate::scrollViewDidEndDragging is called and
&gt; just informs ScrollingTreeScrollingNodeDelegateIOS about the scroll &amp; scroll
&gt; end.

I tried sending the commitPotentialTap message from there but it does not work. The target node &amp; position must be set first with a potentialTapAtPosition, so it seems the solution will be a bit more complex.

&gt; - When you tap directly the blue rectangle,
&gt; WKContentView::_singleTapGestureRecognizer will invoke
&gt; WebPageProxy::commitPotentialTap in order to tell the Web process to
&gt; dispatch an event.

WKContentView::_singleTapGestureRecognizer is a WKSyntheticTapGestureRecognizer. However, this listener is not triggered when the UIScrollView is scrolling...

&gt; I wonder if there is something wrong in the fact that touch gesture are not
&gt; handled by WKContentView during scrolling or if the scrolling delegate
&gt; should do similar work as WKContentView to recognize touch gestures.

If the former, I guess that&apos;s something Apple should fix. For the latter, a proper solution will probably be to use some UITapGestureRecognizer on UIScrollView, if that&apos;s ever possible. I&apos;ll investigate more on this but found  https://stackoverflow.com/questions/27715448/uitapgesturerecognizer-on-uiscrollview</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2192766</commentid>
    <comment_count>4</comment_count>
    <who name="Alex">alexander</who>
    <bug_when>2026-03-23 07:59:41 -0700</bug_when>
    <thetext>Any plans to fix this 8 years old absolutely abysmal disregard for specification?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195218</commentid>
    <comment_count>5</comment_count>
    <who name="Abrar Rahman Protyasha">a_protyasha</who>
    <bug_when>2026-03-30 10:57:27 -0700</bug_when>
    <thetext>*** Bug 310540 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195219</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-03-30 11:01:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/173706901&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>384303</attachid>
            <date>2019-11-25 09:35:49 -0800</date>
            <delta_ts>2019-11-25 09:35:49 -0800</delta_ts>
            <desc>testcase</desc>
            <filename>bug-191218.html</filename>
            <type>text/html</type>
            <size>1339</size>
            <attacher name="Frédéric Wang Nélar">fred.wang</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+Cjxod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Ugc3F1
YXJlIHdpbGwgZGlzcGF0Y2ggZXZlbnRzLjwvbGk+CiAgICAgIDxsaT5UaGlzIHNob3VsZCB3b3Jr
IHRvbyB3aGVuIHRoZSBsYXJnZSBzcXVhcmUgaXMgc2Nyb2xsaW5nLjwvbGk+CiAgICA8L3VsPgog
ICAgPHByZSBpZD0ibG9nIj48L3ByZT4KICAgIDxzY3JpcHQ+CiAgICAgIHZhciBpY29uID0gZG9j
dW1lbnQuZ2V0RWxlbWVudEJ5SWQoImljb24iKTsKICAgICAgWyJjbGljayIsICJ0b3VjaHN0YXJ0
IiwgInRvdWNoZW5kIiwgInRvdWNobW92ZSIsICJ0b3VjaGNhbmNlbCJdLmZvckVhY2gobmFtZSA9
PiB7CiAgICAgICAgaWNvbi5hZGRFdmVudExpc3RlbmVyKG5hbWUsIGZ1bmN0aW9uIChlKSB7CiAg
ICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgibG9nIikuaW5uZXJUZXh0ICs9IGBEaXNw
YXRjaGVkICR7bmFtZX0gZXZlbnQ6ICR7ZX1cbmA7CiAgICAgICAgfSk7CiAgICAgIH0pOwogICAg
PC9zY3JpcHQ+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>