If I go to https://askubuntu.com/faq and click on this FAQ, it doesn't take me to another section of the page.
2 Answers
This behavior depends on the browser, but it was broken in some cases (fixed in the next build).
We do something insanely hacky here because of how different browsers behave: WE CHANGE YOUR LINKS! We do this because we want the FAQ to be as accessible as possible and highlight exactly what was linked to (by copying it up top and giving it an eye-catching fade).
Details:
To get this effect but not have your browser jump immediately to the #id
element in the page (from the URL hash) we actually change the IDs on all the sections from #id
to #link-id
(this is explicitly to prevent the jumping).
Now that we've broken everything, JavaScript compensates and our click handlers undo that link-
-ification. That wasn't happening in the full URL (href="http://askubuntu.com/faq#etiquette"
) case like askubuntu has, it was only happening in hash (href="#etiquette"
) case, this is fixed for the next build.
I can't reproduce this in Firefox at all. I can click on the Etiquette section and it takes me that section of the page in the faq.
-
I tried it on Safari at home, and it didn't work. vimeo.com/35452993 ought to show the bug when the video's converted in half an hour's time. Commented Jan 22, 2012 at 11:05
-
@AndrewGrimm - thanks for the video, that helped narrow it down quickly. This bug depends on the browser (and event order), but should be fixed for everyone in the next build.– Nick Craver ModCommented Jan 22, 2012 at 12:42
-