Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comment anchor points need adjustment to offset the static top menu #124

Closed
aaroncox opened this issue Aug 11, 2016 · 4 comments
Closed

Comments

@aaroncox
Copy link
Contributor

Found this on steemit a bit ago.

https://steemit.com/steemit-bug/@ash/steemit-bug-report-comment-anchors

What's happening is when the page scrolls to an anchor, the static navigation at the top of the page is covering the anchor point. An adjustment should be made either through a plugin or through detaching the anchors to offset it's position accounting for the navigation elements.

@shanejonas
Copy link

shanejonas commented Aug 11, 2016

I think the size of the images/iframes is to blame as well. They don't load and take up space by the time it scrolls you to the right y value.

@aaroncox
Copy link
Contributor Author

aaroncox commented Aug 11, 2016

That's part of the problem as well, but even without any images/iframes on a post, it's still happening.

Upon further discussion, yet another part of this problem is the message at the bottom of each post that says "Authors get paid...".

Example here:

page-jump

The logic on that element should probably be changed to hide on default, and then showing if we detect they aren't logged in. Then again, if we did that, it would push content down further after initial page load and mess up the anchor anyways.

roadscape added a commit that referenced this issue Aug 12, 2016
…nt, and offset scroll by -200 to account for disappearing promo banner #124
@roadscape
Copy link
Contributor

I cleaned up anchor/scrolling logic and added a 200px scroll offset for now. Without the banner issue, a 60px scroll offset works well to position the comment comfortably at the top of the screen.

To hide the promo banner until login status is known may be good as a general behavior, though it's not clear to me why it wouldn't be known immediately upon page load. Pushing the content down is not ideal, but better than the comment disappearing off the top of the screen. Hence the 200px workaround.

Inserting/removing elements and expecting scroll-to to work is not simple.. there is probably a better way to approach this issue

@roadscape
Copy link
Contributor

Workaround in place and working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants