Closed Bug 638884 Opened 14 years ago Closed 14 years ago

Even if showfor makes content move, try to keep the right scroll position from anchors

Categories

(support.mozilla.org :: Knowledge Base Software, task, P3)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jsocol, Assigned: paulc)

Details

If a user visits kb/foo#anchor and the position of #anchor moves after the showfor JS hides content, the result is that user doesn't appear to be where they should, and it looks like the content has been jumping around. To see this, create a large blob of text, wrap it in {for fx3}{/for}, put a heading after it, then try opening the page anew with that heading's anchor. Maybe something as simple resetting the scroll height at the end of showfor the first time? Ok, that isn't that simple.
See also bug 638127.
Assignee: nobody → paulc
Now we scroll to the element after showfor hides/shows content. Master: https://github.com/jsocol/kitsune/commit/ef5e8ee2f17243180bea7fc988511203a9d5e23e QA: to test this, I used this content: {for fx35} == Fx35 only == This would be hidden on Fx4. {/for} == Always visible == This would be always visible. And then I went to /kb/article-slug#w_always-visible Loading this should take you to the correct heading, also regardless of your position on the page when reloading.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.