<?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>17245</bug_id>
          
          <creation_ts>2012-05-30 10:54:16 +0000</creation_ts>
          <short_desc>&quot;Append a new entry at the end of the History object&quot; - there seems to be a special case when the document is not completely loaded and the navigation wasn&apos;t triggered by user intereaction. In this case Opera + WebKit (always) and Gecko (sometimes) don&apos;t</short_desc>
          <delta_ts>2012-12-05 20:41:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#scroll-to-fragid</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>james</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68305</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-05-30 10:54:16 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#scroll-to-fragid
Complete: http://www.whatwg.org/c#scroll-to-fragid

Comment:
&quot;Append a new entry at the end of the History object&quot; - there seems to be a
special case when the document is not completely loaded and the navigation
wasn&apos;t triggered by user intereaction. In this case Opera + WebKit (always)
and Gecko (sometimes) don&apos;t add new history positions for fragment
navigations. This seems like the behaviour that users would expect.

Posted from: 2001:4c28:a030:30:6ca7:4293:d3c0:b9a1
User agent: Opera/9.80 (X11; Linux x86_64; U; Edition Next; en) Presto/2.10.289 Version/12.00</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68308</commentid>
    <comment_count>1</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2012-05-30 12:26:55 +0000</bug_when>
    <thetext>This also seems to be the case for non-fragment navigations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68336</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-05-30 23:16:16 +0000</bug_when>
    <thetext>Isn&apos;t this already handled by the &quot;replacement enabled&quot; logic? If not, could you elaborate on exactly what sequence of events you are thinking of here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68392</commentid>
    <comment_count>3</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2012-05-31 11:11:34 +0000</bug_when>
    <thetext>Possibly? I find this part of the spec quite confusing although I think this is mainly just because the required behaviour is complex. To the extent that it&apos;s because the spec could be clarified, I don&apos;t have any concrete suggestions.

The test I had in mind was something like http://hoppipolla.co.uk/tests/navigation/001.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68439</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-05-31 17:29:48 +0000</bug_when>
    <thetext>That&apos;s a complicated test with many things going on. Which specific part did you have in mind?

If you mean whether setting location replaces the current document or not, that&apos;s already taken care of in the definition of the setter. Search the spec for &quot;if the Location object&apos;s associated Document object has completely loaded, then the user agent must act as if the assign() method had been called with the new value as its argument. Otherwise, the user agent must act as if the replace() method had been called with the new value as its argument&quot;.

Please let me know if that doesn&apos;t address your concern.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68482</commentid>
    <comment_count>5</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2012-06-01 08:03:46 +0000</bug_when>
    <thetext>It seems like if I replace the use of the location setter with setting the src of the iframe, I get the same pattern i.e. history.length increases by one if the src is set after the page has loaded but doesn&apos;t increase if it is set while the page is loading.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70881</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 17:40:59 +0000</bug_when>
    <thetext>This bug was cloned to create bug 18207 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74536</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-09-26 03:48:15 +0000</bug_when>
    <thetext>&lt;iframe src&gt; setting was fixed recently as part of another bug. Any other cases?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79268</commentid>
    <comment_count>8</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2012-12-03 10:14:50 +0000</bug_when>
    <thetext>I haven&apos;t checked, but are cases like:

data:text/html;charset=utf-8,%3C!DOCTYPE%20html%3E%0A%3Cscript%3Elocation.href%3D%22data%3Atext%2Fhtml%2CHistory%20length%20before%20navigation%3A%20%22%20%2B%20history.length%20%2B%20%22%3B%20after%20navigation%20%3Cscript%3Eonload%3Dfunction()%20%7Bdocument.body.firstChild.textContent%20%2B%3D%20history.length%7D%3C%22%20%2B%20%22%2Fscript%3E%22%0A%3C%2Fscript%3E

handled? That doesn&apos;t involve an iframe at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79336</commentid>
    <comment_count>9</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-04 00:03:56 +0000</bug_when>
    <thetext>That&apos;s the location setter, so the spec already defines that as far as I can tell. (See paragraph 2 of comment 4.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79400</commentid>
    <comment_count>10</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2012-12-04 13:41:19 +0000</bug_when>
    <thetext>Oh of course. Sorry.

I can&apos;t currently find a case that isn&apos;t either iframe related or location setter related.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79500</commentid>
    <comment_count>11</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-05 20:41:26 +0000</bug_when>
    <thetext>Excellent.

If you do, please don&apos;t hesitate to reopen the bug or file a new one, of course.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>