<?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>17155</bug_id>
          
          <creation_ts>2012-05-23 09:53:34 +0000</creation_ts>
          <short_desc>The &quot;navigating to a fragment identifier&quot; algorithm shouldn&apos;t be async</short_desc>
          <delta_ts>2013-04-22 18:01:59 +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>FIXED</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>Needs Research</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="James Graham">james</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68040</commentid>
    <comment_count>0</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2012-05-23 09:53:34 +0000</bug_when>
    <thetext>When UAs navigate to fragment identifiers they seem to do it in a sync way i.e. 

location.hash = &quot;#bar&quot;
//location.hash is now &quot;#bar&quot;

However the hashchange event seems to be queued rather than fired synchronously so that
location.hash = &quot;foo&quot;
onhashchange = function(e) {document.body.innerHTML += &quot;&lt;p&gt; &quot; + e.oldURL + &quot; &quot; + e.newURL}
location.hash = &quot;bar&quot;

causes the event to be fired twice.

For other navigations, the async behaviour seems to be correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68042</commentid>
    <comment_count>1</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2012-05-23 10:01:30 +0000</bug_when>
    <thetext>Also, the scrolling seems to happen synchronously</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70823</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 17:33:57 +0000</bug_when>
    <thetext>This bug was cloned to create bug 18178 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71734</commentid>
    <comment_count>3</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2012-08-01 11:26:46 +0000</bug_when>
    <thetext>And the popstate event is async.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77368</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-10-30 00:25:08 +0000</bug_when>
    <thetext>There seem to be multiple bugs here.

Do you have some test cases?

Are things like pending history.back() calls aborted as well? Is the new session history entry added synchronously or asynchronously? (Might be able to tell by judicious use of back()/forwards() after the setter is invoked.)

I guess the &quot;Traverse the History&quot; algorithm needs to be given a flag to decide whether the events are sync or async? That&apos;s unfortunate. Are the events synchronous in the same task? Or two different tasks?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86487</commentid>
    <comment_count>5</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-04-22 18:01:59 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7846.
Check-in comment: Try to match reality better for dynamic location.hash navigation.
http://html5.org/tools/web-apps-tracker?from=7845&amp;to=7846</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>