JS bug: location.hash, .href
Harri Porten
porten at trolltech.com
Tue May 7 14:46:05 BST 2002
On Tue, 7 May 2002, Will Stephenson wrote:
> I was using a form (http://www.gradschools.ac.uk/apply/apply_apply.html), some
> JS in it moves you around, but has the unpleasant side effect of blanking the
> form of all input so far.
>
> I looked around and found it was because they assign to location.href in order
> to move the user around the form, I've produced a testcase which demonstrates
> this, but more importantly, using location.hash (which I think is the proper
> way) to move to a named anchor also clears the form.
The JS implementation for the location object treats all href changes the
same: they result in a redirection to the new URL. The case of just
changing the hash has the same result as e.g. changing the host. Namely a
reload of the page.
khtml developers: is there a way to jump to a hash inside of document via
the KHTMLPart API ?
> I don't really know whether what is being done here is canonical JS (not a
> specialist) so I would appreciate it if you could tell me if Konq is behaving
> correctly or if it's a bug.
It's not necessary a bug but a different behaviour.
Harri.
More information about the kfm-devel
mailing list