A kind reminder we would like all registered users to weigh in on one of our forum's security policies.
Please take a moment to read this thread and place a vote.
https://forum.palemoon.org/viewtopic.php?f=17&t=32935

Hash no longer updates in the address bar

Board for discussions around the Basilisk web browser.

Moderator: Basilisk-Dev

User avatar
chmod777
New to the forum
New to the forum
Posts: 2
Joined: 2025-11-12, 11:51

Hash no longer updates in the address bar

Post by chmod777 » 2025-11-12, 12:06

Steps to reproduce:

1- Run window.location.href = "#test"; in the browser console (on any page).
2- Notice that #test is not appended to the URL in the address bar.
3 (optional)- Refresh the page (F5): #test then appears in the address bar.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38503
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Hash no longer updates in the address bar

Post by Moonchild » 2025-11-12, 12:23

This deliberate to prevent abuse (user DoS by taking over the address bar while typing) and was part of the changes in 33.8.2
https://www.palemoon.org/releasenotes.shtml#v33.8.2
See also the discussion about potential abuses in Issue #1954
By the way: If the address bar isn't focused, the hash will be updated.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
chmod777
New to the forum
New to the forum
Posts: 2
Joined: 2025-11-12, 11:51

Re: Hash no longer updates in the address bar

Post by chmod777 » 2025-11-12, 15:55

Thank you for the answer!

Moonchild wrote:
2025-11-12, 12:23
By the way: If the address bar isn't focused, the hash will be updated.
Hmmm, the issue actually happens in that exact case on my end (otherwise I have to admit I probably wouldn't even have noticed the change in anchor behavior :P).

It still doesn't work even if I wrap the sample from my first post in a setTimeout (so I have time to close the console and make sure the document has focus).

It also doesn't work when simply clicking a link that only holds a hash. For example:

Code: Select all

document.body.innerHTML = '<a href="#test">CLICK ME! (this will NOT update the hash in the address bar)</a>';

Basilisk version: 2025.10.10 (64-bit)

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38503
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Hash no longer updates in the address bar

Post by Moonchild » 2025-11-12, 16:40

Oh, I apologize, didn't notice this was in the Basilisk board, and I'm not sure what I said applies here. My bad, let me hand the mic over to basilisk-dev ;)
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite