<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>13498</bug_id>
          
          <creation_ts>2011-08-01 10:36:36 +0000</creation_ts>
          <short_desc>document.readyState should return to &apos;loading&apos; on navigation</short_desc>
          <delta_ts>2011-09-27 21:20:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NEEDSINFO</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>test needed</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hallvord R. M. Steen">hsteen</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>hsivonen</cc>
    
    <cc>ian</cc>
    
    <cc>jonas</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>51895</commentid>
    <comment_count>0</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2011-08-01 10:36:36 +0000</bug_when>
    <thetext>Opera has problems with uploading attachments on T-Online.de&apos;s webmail, it boils down to an issue that might have some relevance for HTML5&apos;s definition of the readyState property / document readiness calculation (  http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#current-document-readiness ). 

What happens in IE is that when a window is being navigated away from the current document, that document&apos;s readyState changes from &apos;complete&apos; to &apos;loading&apos;. (It would have made more sense in this case to have &apos;readyState&apos; as a property on the window, but that&apos;s a sin of designers past..).

HTML5 has not noticed this, it seems (or chosen to ignore it?), so the spec as-written seems to asssume that readyState won&apos;t ever switch from complete back to loading. The site sniffs for WebKit-based browsers and Firefox, because they don&apos;t emulate IE on this point.

Now that we&apos;ve realised IE does some extra stuff and found an important site depending on it. I think switching back to &apos;loading&apos; when some load is pending makes sense.

(Originally posted on public-html: http://lists.w3.org/Archives/Public/public-html/2011Jul/0199.html )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52514</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:02:10 +0000</bug_when>
    <thetext>mass-moved component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54524</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-10 01:09:44 +0000</bug_when>
    <thetext>Hrm, that&apos;s kind of a pain. Do they switch it back to &apos;complete&apos; if the load ends up being a download or ends up canceled or whatnot? Where does this happen relative to the onbeforeunload handler? How about relative to parser abortion in the case the readyState was still not &apos;complete&apos;? How does this interact with history navigation? (e.g. if you go back to the document and it was bfcached, does it still have this new state or does it go back?)

Do other browsers do this also?

Are there any tests for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55121</commentid>
    <comment_count>3</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2011-08-15 18:23:19 +0000</bug_when>
    <thetext>&gt; How about relative to parser abortion in the case the readyState was still not &apos;complete&apos;?

How can I test this - test if load or DOMContentLoaded fires before the new navigation??</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55456</commentid>
    <comment_count>4</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-08-19 00:30:45 +0000</bug_when>
    <thetext>I would rather not add this kind of complexity if we&apos;ve only found one website that breaks over it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56040</commentid>
    <comment_count>5</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2011-08-30 13:18:14 +0000</bug_when>
    <thetext>Metooing to what Jonas said. Recently, I discovered that readyState management in Gecko isn&apos;t that great for docs that aren&apos;t of the most normal HTML kind. Patching things such that all kinds of docs have their readyStates progress reasonably and monotonically was annoying enough (I didn&apos;t even get it done all the way), so having readyStates go backwards intentionally wouldn&apos;t be nice at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56600</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-10 05:29:50 +0000</bug_when>
    <thetext>To test this you just need to write pages that clearly demonstrate the difference in behaviour between what the spec says and what you want it to say. (I should say &quot;demo&quot;, not &quot;test&quot;, really.)

Without tests I really have no idea what to do here and am likely to agree with comment 4 and comment 5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57449</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-27 21:20:17 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Did Not Understand Request
Change Description: no spec change
Rationale: see comment 6. I&apos;m happy to consider this further, but we need clear tests and ideally we need evidence of more than one site needing it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>