Don't hide the selected anchor behind the search panel

RESOLVED FIXED

Status

P2
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: erik, Assigned: espressive)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
When you go to, for example, http://dxr.allizom.org/mozilla-central/source/accessible/public/nsIAccessibilityService.h#26, line 26 gets hidden behind the absolutely positioned search panel. Let's make it not do that. Nick's mentioned he'd like it in the center of the viewport, which is what the production JS does now. I could also live with a few lines below the search panel. The common theme here is to show some context on each side.

The old implementation used an onhashchange piece of JS to do this. It might also be possible with clever use of padding in plain CSS. https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header

If we end up redoing the markup for performance (see bug 964091), it would probably make sense to do that first.
(Assignee)

Comment 1

5 years ago
Ah yes, I have seen this and was meaning to fix it. Thanks for filing the bug, will sort it out.
Assignee: nobody → schalk.neethling.bugs
Status: NEW → ASSIGNED
(Assignee)

Comment 2

5 years ago
(In reply to Erik Rose [:erik][:erikrose] from comment #0)
> When you go to, for example,
> http://dxr.allizom.org/mozilla-central/source/accessible/public/
> nsIAccessibilityService.h#26, line 26 gets hidden behind the absolutely
> positioned search panel.....

I believe in our scenario a little bit of JS is what is going to be required. The CSS only solution definitely assumes a different source structure than what we have.

Comment 3

5 years ago
Commit pushed to ui at https://github.com/mozilla/dxr

https://github.com/mozilla/dxr/commit/1296b6a2629da7a29022ebf73d2b637934282c34
Fix Bug 964413, ensure that highlighted anchor is never hidden behind header

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.