Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

back button not working with first anchor

  • 11 svar
  • 1 har dette problemet
  • 9 views
  • Siste svar av Wayne

more options

I have a web page I created that has a list of clickable links at the top. These links go to named anchors down the page. This problem only exists in Firefox. I have tried it in Internet Explorer and Edge and it works properly in both. Clicking the links follows them properly. It's when I use the back button to go back to the top of the page, and only on the first link, that the problem occurs. The button becomes dimmed as though it went back, but it didn't. It stayed at the location of the first named anchor. This only happens with the first one, not the others on the page. The back button works properly on all of the others.

I even put the page on my website to see if being online made a difference (since it has only been local up to this point). The first time I clicked the first link and then the back button, it worked. Every time after that it doesn't work. Again, this only happens with Firefox, so I am thinking it must be a bug.

Any help to get around this, or do I have to just accept that Firefox will have this issue until it doesn't?

More info:

I added another anchor before the first one to see if that would make a difference. It didn't, and now both the new anchor and the old first anchor had the same problem. I tried renaming the anchor. No go. Then I added an image to the top of the page (below the links, but before the first anchor). Lo and behold the (now) second anchor behaves properly and the back button returns to the top of the page, but the new first anchor still has the problem. I am starting to think Firefox has some minimum distance down the page it has to travel before the back button responds appropriately.

I have a web page I created that has a list of clickable links at the top. These links go to named anchors down the page. This problem only exists in Firefox. I have tried it in Internet Explorer and Edge and it works properly in both. Clicking the links follows them properly. It's when I use the back button to go back to the top of the page, and only on the first link, that the problem occurs. The button becomes dimmed as though it went back, but it didn't. It stayed at the location of the first named anchor. This only happens with the first one, not the others on the page. The back button works properly on all of the others. I even put the page on my website to see if being online made a difference (since it has only been local up to this point). The first time I clicked the first link and then the back button, it worked. Every time after that it doesn't work. Again, this only happens with Firefox, so I am thinking it must be a bug. Any help to get around this, or do I have to just accept that Firefox will have this issue until it doesn't? More info: I added another anchor before the first one to see if that would make a difference. It didn't, and now both the new anchor and the old first anchor had the same problem. I tried renaming the anchor. No go. Then I added an image to the top of the page (below the links, but before the first anchor). Lo and behold the (now) second anchor behaves properly and the back button returns to the top of the page, but the new first anchor still has the problem. I am starting to think Firefox has some minimum distance down the page it has to travel before the back button responds appropriately.

Endret av Wayne

All Replies (11)

more options

Can you show URL of this page to let us reproduce it?

more options

I notice the issue on this old page: when I click the link in the first paragraph for Troubleshooting section, then immediately click Back, it doesn't go back. If I click the link, then scroll the document by one click and then click Back, it works fine.

https://www.jeffersonscher.com/ffu/armagadd-on_2_0.html

It's annoying that the section header is behind the fixed header bar. I guess this was my older design.

If you compare this newer page, there is a script that runs after navigation to pull the heading down into view and highlight it. This document doesn't have the problem, I think because of that tiny bit of scripted scrolling:

https://www.userchrome.org/megabar-styling-firefox-address-bar.html

more options

The page is here . I added more to the page, but the problem still happens on both the first and second links.

more options

I don't know why my reply isn't showing up, even though the page says I posted on a few minutes ago. The link is:

https://wayneca.neocities.org/Wolfenstein/modding.html

more options

(Hi Wayne, when a newer poster includes an external link, your reply is diverted to moderation before appearing here.)

more options

OK. Thanks for telling me. I posted it a second time because I wasn't sure why it didn't show up the first time.

more options

Hi Wayne, I also have the extended support release of Firefox 68.10.0esr installed for testing, and it works with your page and my older page.

We did have a thread back in the Firefox 69 days about really weird behavior with internal page links, but I'm not sure it's the same problem: https://support.mozilla.org/questions/1269597

more options

That thread sounds very much like what the problem is on my page, though there may be a few differences. It sounds to me like the problem was introduced in 69 and hasn't been found/fixed yet.

more options

I just found that what was described in that thread is exactly what happens on my page. Scrolling back to the top, after having hit the back button and nothing happens, just hovering over a link or moving the mouse pointer back onto the titlebar causes the page to jump back down to the last location, which is the named anchor location I clicked on first. To me this means that the problem in version 69 still exists in version 70. I hope the programmers will be able to figure out what's causing it and fix it. It makes the page difficult to deal with on the first two links.

more options

Hi Wayne, I don't know whether anyone has filed a bug for this problem. You can search and/or file on Bugzilla and at worst, it will be a duplicate. https://bugzilla.mozilla.org/

more options

I have submitted a bug report. Now to wait and see how long it takes to get fixed. Thanks for the help.