Bug 24578 - Changing location hash on a frameset causes reload
: Changing location hash on a frameset causes reload
Status: UNCONFIRMED
: WebKit
Frames
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P2 Normal
Assigned To:
: http://pilgrimwebdesign.com/changehas...
:
:
:
  Show dependency treegraph
 
Reported: 2009-03-13 10:43 PST by
Modified: 2011-12-18 21:57 PST (History)


Attachments
Reduction (691 bytes, application/zip)
2009-03-13 10:44 PST, Jonathan Hurshman
no flags Details
Display the reload event when the location.hash is changed. (526 bytes, text/html)
2010-04-07 23:05 PST, Marc Bonnier
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-03-13 10:43:50 PST
Changing the location hash on a frameset causes the frameset to reload. This occurs whether the hash is changed manually or programmatically by setting window.location.hash.

Firefox and IE do not exhibit this behavior; neither non-frameset pages nor frameset pages reload when the hash is changed.

This is troublesome for trying to maintain state by setting the hash.

Reduction is available at http://pilgrimwebdesign.com/changehash.html. This is a frameset containing only one frame. That frame displays new Date().getSeconds(). It also kicks off a timeout for 5 seconds to set the top's hash value. The result in WebKit is that the whole page reloads every 5 seconds, and one can observe the value displayed in the frame changing. In Firefox and IE, no reload happens.

I have reproduced this in the current nightly, in Safari 3.1.2, and in Chrome.
------- Comment #1 From 2009-03-13 10:44:58 PST -------
Created an attachment (id=28585) [details]
Reduction
------- Comment #2 From 2009-04-01 02:38:12 PST -------
http://www.dxenia.com/hash/
------- Comment #3 From 2009-04-01 02:50:02 PST -------
I have same problem too, waiting for immediate action...
------- Comment #4 From 2009-09-16 02:09:07 PST -------
Hi

Same problem here. Frameset based page, using hash to navigate. Safari and chrome doesn't work properly. Though sometimes there is a workaround but overall it increases the development and maintenance time.

Best Regards
------- Comment #5 From 2009-09-16 02:18:34 PST -------
Example page: http://www.utopicfarm.com/tolga/hash/
------- Comment #6 From 2010-04-07 23:05:30 PST -------
Created an attachment (id=52828) [details]
Display the reload event when the location.hash is changed.

Same bug here.
Is it possible to assign this light bug to somebody ?

Thanks.
------- Comment #7 From 2011-12-17 08:40:00 PST -------
The current behaviour is caused by FrameLoader::shouldScrollToAnchor
in WebCore/loader/FrameLoader.cpp.

Scrolling to an anchor is explicitly excluded for a frameset, the reason is given in the comments: "we don't want to just scroll if a link from within a frameset is trying to reload the frameset into _top."

In Firefox a link from within the frameset can reload the frameset, but only as long as the link contains no hash.

ie   <a href="index.html" target="_top">Reload!</a>
will reload the frameset

but  <a href="index.html#" target="_top">Reload!</a>
will not.