Closed Bug 1125877 Opened 11 years ago Closed 6 years ago

mozilla-pager.js should work around scrolling to ID when page hash is included in URL

Categories

(www.mozilla.org :: Bedrock, defect)

Production
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sgarrity, Unassigned)

Details

(Whiteboard: [kb=1642523] [Moz Content 2015])

When the tab/pager script mozilla-pager.js is used on a page on mozilla.org: 1. if a direct link to a particular tab (including the tab hash in the URL) 2. the browser will attempt to scroll down to the #anchor 3. the JS adds the CSS classes that hide the non-active pager pages 4. you end up scrolled down past the relevant content because of the hiding of the non-active pagers. We used to hack around this with a snippet of inline JS in each pager page, like this: <script> document.getElementById('foo').id = 'page-foo'; </script> This renamed the IDs immediately so the browser had nothing to scroll to. Since this relies on inline JS, though, it's not something we can continue to use. See docs for mozilla-pager: http://bedrock.readthedocs.org/en/latest/mozilla-pager.html https://github.com/mozilla/bedrock/pull/2660#issuecomment-71488092
Whiteboard: [kb=1642523]
Whiteboard: [kb=1642523] → [kb=1642523] [Moz Content 2015]

We no longer use or support this library in bedrock, closing.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.