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

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Hurshman 2009-03-13 10:43:50 PDT
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 Jonathan Hurshman 2009-03-13 10:44:58 PDT
Created attachment 28585 [details]
Reduction
Comment 2 Tolga Arican 2009-04-01 02:38:12 PDT
http://www.dxenia.com/hash/
Comment 3 Sezgin 2009-04-01 02:50:02 PDT
I have same problem too, waiting for immediate action...
Comment 4 Gabor Kormany 2009-09-16 02:09:07 PDT
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 Tolga Arican 2009-09-16 02:18:34 PDT
Example page: http://www.utopicfarm.com/tolga/hash/
Comment 6 Marc Bonnier 2010-04-07 23:05:30 PDT
Created attachment 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 TomSW 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.