<?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>169129</bug_id>
          
          <creation_ts>2017-03-03 05:41:24 -0800</creation_ts>
          <short_desc>Can&apos;t reliably scroll page whenever mouse cursor inside iframe inside scrollable div with touchpad</short_desc>
          <delta_ts>2019-05-31 15:26:29 -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>Scrolling</component>
          <version>Safari 10</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.12</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <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>
          <dependson>150168</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kuryshev">me</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aadwan</cc>
    
    <cc>me</cc>
    
    <cc>me</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>tjarwan22</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1283137</commentid>
    <comment_count>0</comment_count>
      <attachid>303314</attachid>
    <who name="Michael Kuryshev">me</who>
    <bug_when>2017-03-03 05:41:24 -0800</bug_when>
    <thetext>Created attachment 303314
Test case

I can&apos;t scroll page (with touchpad, mouse works fine) whenever mouse cursor inside iframe in case when iframe inside scrollable div.

Steps to reproduce:

1. Open test-case.html with Safari browser.
2. Try to scroll page with touchpad while cursor within iframe boundaries.

Actual results:

You can scroll page only up.

Expected results:

Page scrolls up and down.

Safari 10.0.1 (12602.2.14.0.7)
macOS Sierra 10.12.1
Macbook Pro 13&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1283150</commentid>
    <comment_count>1</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2017-03-03 07:31:37 -0800</bug_when>
    <thetext>Your iframe shows &quot;HTTP Error 503. The service is unavailable.&quot; for me, but if I replace the src attribute with the URL of a large image, I can reproduce this. I&apos;ll take a look -- there might be some place we&apos;re not resetting the latching state properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1283393</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-03-03 21:57:23 -0800</bug_when>
    <thetext>&lt;rdar://problem/30848504&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525917</commentid>
    <comment_count>3</comment_count>
    <who name="Tareq Jarwan">tjarwan22</who>
    <bug_when>2019-04-10 03:30:41 -0700</bug_when>
    <thetext>I have the same issue:

I can&apos;t scroll down a page using 2 fingers scroll(with a trackpad, the external mouse works fine) whenever the mouse cursor inside an iframe in the case when iframe inside scrollable div.


Safari 10.0.1 (12602.2.14.0.7)
macOS Sierra 10.12.1
Macbook Pro 13&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536003</commentid>
    <comment_count>4</comment_count>
    <who name="Abdullah Adwan">aadwan</who>
    <bug_when>2019-05-14 04:29:20 -0700</bug_when>
    <thetext>(In reply to Wenson Hsieh from comment #1)
&gt; Your iframe shows &quot;HTTP Error 503. The service is unavailable.&quot; for me, but
&gt; if I replace the src attribute with the URL of a large image, I can
&gt; reproduce this. I&apos;ll take a look -- there might be some place we&apos;re not
&gt; resetting the latching state properly.

Hi Wenson, is this being looked at? We still having the same problem in Safari 12.1, macOS Mojave 10.14.4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536206</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-05-14 13:03:08 -0700</bug_when>
    <thetext>Please provide a URL we can use to test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536235</commentid>
    <comment_count>6</comment_count>
    <who name="Abdullah Adwan">aadwan</who>
    <bug_when>2019-05-14 14:06:08 -0700</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #5)
&gt; Please provide a URL we can use to test.

Steps to Reproduce:
Go to: https://readium.firebaseapp.com/?epub=epub_content%2Faccessible_epub_3&amp;
From Settings in left upper hand of the screen select Layout then select Continuous 
Try scrolling down with trackpad 

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536236</commentid>
    <comment_count>7</comment_count>
    <who name="Abdullah Adwan">aadwan</who>
    <bug_when>2019-05-14 14:07:49 -0700</bug_when>
    <thetext>(In reply to Abdullah Adwan from comment #6)
&gt; (In reply to Simon Fraser (smfr) from comment #5)
&gt; &gt; Please provide a URL we can use to test.
&gt; 
&gt; Steps to Reproduce:
&gt; Go to:
&gt; https://readium.firebaseapp.com/?epub=epub_content%2Faccessible_epub_3&amp;
&gt; From Settings in left upper hand of the screen select Layout then select
&gt; Continuous 
&gt; Try scrolling down with trackpad 
&gt; 
&gt; Thanks

Edit: From Settings in right upper hand of the screen</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536240</commentid>
    <comment_count>8</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-05-14 14:13:25 -0700</bug_when>
    <thetext>Thanks, I can reproduce the issue there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536465</commentid>
    <comment_count>9</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-05-15 09:59:26 -0700</bug_when>
    <thetext>The ePub is a series of scrolling=&quot;no&quot; iframe inside an overflow:scroll. If the mouse is over an iframe, that traps the scroll. If it&apos;s over the overflow (outside the iframe), scrolling works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536468</commentid>
    <comment_count>10</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2019-05-15 10:07:30 -0700</bug_when>
    <thetext>EventHandler::platformPrepareForWheelEvents() has some confusing code:

            scrollableContainer = findEnclosingScrollableContainer(wheelEventTarget.get(), wheelEvent.deltaX(), wheelEvent.deltaY());
            if (scrollableContainer &amp;&amp; !is&lt;HTMLIFrameElement&gt;(wheelEventTarget))
                scrollableArea = scrollableAreaForContainerNode(*scrollableContainer);
            else {
                scrollableContainer = view-&gt;frame().document()-&gt;bodyOrFrameset();
                scrollableArea = makeWeakPtr(static_cast&lt;ScrollableArea&amp;&gt;(*view));
...

Here scrollableContainer is the overflow:scroll in the main document. wheelEventTarget is the &lt;iframe&gt; element. So we call into:
                scrollableContainer = view-&gt;frame().document()-&gt;bodyOrFrameset();
and scrollableContainer ends up as the body(!) of the main page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1540865</commentid>
    <comment_count>11</comment_count>
    <who name="">me</who>
    <bug_when>2019-05-31 15:26:29 -0700</bug_when>
    <thetext>I can reproduce this with my application as well. Ping me if you need additional repro cases.

One thing I noticed that might be worth mentioning is that this only happens when the iframe height is smaller than the actual height of the document inside the iframe. In the repro page that Abdullah Adwan provided, all the iframes have a height that is 2px smaller than the actual height of the iframe document because the iframe has a border of size 1px (1px on top and 1px at the bottom, so 2px in total). Scrolling works after removing the border on the iframes. This is consistent with what I observe in my application.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>303314</attachid>
            <date>2017-03-03 05:41:24 -0800</date>
            <delta_ts>2017-03-03 05:41:24 -0800</delta_ts>
            <desc>Test case</desc>
            <filename>test-case.html</filename>
            <type>text/html</type>
            <size>709</size>
            <attacher name="Michael Kuryshev">me</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+CjxodG1sPgogICAgPGhlYWQ+CiAgICAgICAgPHRpdGxlPmlGcmFtZSBz
Y3JvbGxpbmc8L3RpdGxlPgogICAgICAgIDxzdHlsZT4KICAgICAgICAgKiB7CiAgICAgICAgICAg
ICBtYXJnaW46IDA7CiAgICAgICAgICAgICBwYWRkaW5nOiAwOwogICAgICAgICB9CgogICAgICAg
ICBodG1sLCBib2R5IHsKICAgICAgICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICAgICAgIG92
ZXJmbG93OiBoaWRkZW47CiAgICAgICAgIH0KCiAgICAgICAgIC53cmFwcGVyIHsKICAgICAgICAg
ICAgIGhlaWdodDogMTAwJTsKICAgICAgICAgICAgIG92ZXJmbG93LXk6IGF1dG87CiAgICAgICAg
IH0KCiAgICAgICAgIC5jb250YWluZXIgewogICAgICAgICAgICAgaGVpZ2h0OiAyMDAlOwogICAg
ICAgICB9CgogICAgICAgICBpZnJhbWUgewogICAgICAgICAgICAgbWFyZ2luOiA1MHB4OwogICAg
ICAgICB9CiAgICAgICAgPC9zdHlsZT4KICAgIDwvaGVhZD4KICAgIDxib2R5PgogICAgICAgIDxk
aXYgY2xhc3M9IndyYXBwZXIiPgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb250YWluZXIiPgog
ICAgICAgICAgICAgICAgPGlmcmFtZSBzcmM9Imh0dHBzOi8vdS50ZWtuaWsuaW8vajNCeXIuanBn
IiB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCI+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgIDwv
ZGl2PgogICAgPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>