Top navbar covers anchor links
When providing an anchor link it gets covered by the navbar. Example:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/db/schema.rb#L193
You have to scroll up to see the highlighted line.
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Maintainer
@axil This only seems to happen under certain conditions:
- the page is loaded initially (won't work correctly)
- you change the link value to let's say https://gitlab.com/gitlab-org/gitlab-ce/blob/master/db/schema.rb#L194 while already on the page. (will work as expected)
- you don't change the value from 194 and just hit return again on the url. (won't work correctly)
- Maintainer
This can be partially fixed by changing line 29 in blob.js.coffee from:
$.scrollTo("#L#{first_line}") unless e?
to
$("#L#{first_line}").scrollTop() unless e?
This will fix the initial page load. But if you click in the url after the page has finished loading and then hit enter, it'll still get covered by the sidebar because the highlightBlobLines function is not triggered by
$(window).on("hashchange", highlightBlobLines)
I'm not sure which window element could be used as a trigger in that case.
- Author Maintainer
@haynes interesting findings :) \cc @dzaporozhets @vsizov
- Achilleas Pipinellis Status changed to closed
Status changed to closed
- username-removed-25949 mentioned in issue #2381 (closed)
mentioned in issue #2381 (closed)
- username-removed-25949 Status changed to reopened
Status changed to reopened
- Maintainer
@axil This isn't solved yet ;)
- Contributor
@haynes should we close this one in favor of #1614 (closed) ?
- Maintainer
@patricio not sure. In this case we have a javascript component that probably needs a little bit of tweaking as well.
- Author Maintainer
@haynes I don't have this issue in neither case (firefox 40), that's why I closed this.
Header anchor
Code anchor
Edited by Achilleas Pipinellis - Maintainer
@axil open the page in firefox, click in the url bar and hit enter again.
You'll see what i mean ;)
The issue for that page is only partly fixed. - Author Maintainer
@haynes oh yeah... for headings I can't reproduce it though.
- Stan Hu mentioned in merge request !1225 (merged)
mentioned in merge request !1225 (merged)
This bug irked me for a long time, and it was incredibly annoying to fix. I tried dozens of things before settling on this: !1225 (merged).
Edited by Stan Hu- username-removed-444 mentioned in commit c767e2e0
mentioned in commit c767e2e0