Bug 18782 - XMLHttpRequest not sent when scrolling until mouse button is released
Summary: XMLHttpRequest not sent when scrolling until mouse button is released
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-28 06:17 PDT by Florent Guiliani
Modified: 2009-01-05 04:32 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florent Guiliani 2008-04-28 06:17:28 PDT
XMLHttpRequest isn't sent until the mouse button is released when using it in onScroll event.

The bug occur with webkit r32531 on Mac Os X only. The bug doesn't occur with webkit on windows (r32574) and doesn't occur with firefox 2 on mac.

Use this test case to reproduce the bug. Put the file under the location http://localhost/xhr_bug.xhtml and open it. Then drag down the scrollbar. With webkit on mac, the request is sent only when the user release the mouse button. Under webkit on windows or with others browsers on mac, the request is sent without waiting the mouse button release:

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Webkit MacOs XHR mouse release bug</title>
    <script>
      alerted=0;
      function scroll()
      {
         xhr = new window.XMLHttpRequest;
         xhr.open( 'GET', "http://localhost/xhr_bug.xhtml", true );

         xhr.onreadystatechange = function() {
             if(alerted==0)
             {
                 alerted=1;
                 alert( "onreadystatechange" );
             }
         };

         xhr.send( null );
      }
    </script>
  </head>
  <body>
    <div style="overflow-y: scroll; overfow-x: hidden; width: 32px; height: 315px; visibility: visible" onscroll="scroll()">
      <div style="height: 765px">a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a </div>
    </div>
  </body>
</html>
Comment 1 Alexey Proskuryakov 2008-04-28 10:14:48 PDT
Confirmed with r32635. The load is deferred in ResourceLoader::load(), and cannot start until the mouse button is released.
Comment 2 Florent Guiliani 2008-06-04 02:22:19 PDT
Still present in r34342
Comment 3 Alexey Proskuryakov 2009-01-05 04:32:41 PST
See also: bug 23100.