Respec: Back to Top button doesn't work

Created on 1 Mar 2018  Â·  9Comments  Â·  Source: w3c/respec

eg :- https://www.w3.org/TR/payment-request/
The arrow button used for navigating to the top hasn't been assigned any top link in any of the specs.

bug

Most helpful comment

Actually, I lied, it's a ReSpec bug:
https://github.com/w3c/respec/blob/develop/src/core/structure.js#L147

@OrionStar25, you want to fix this?

All 9 comments

@OrionStar25, could you clarify a little bit more? I'm having trouble finding the "Back to Top" button you mentioned. If possible, please include a screenshot.

image

@marcoscaceres this is the back to top button which is not functioning. @OrionStar25 Am I right?

EDIT: The button works in mobile view where the TOC section is not displayed in the side bar but the button doesn't work in desktop view as #toc can't be found in this case

Ah, got it! ok, it actually _is_ functioning... but it's kinda useless because it links back to the "#toc", which is being displayed in the side panel. If you "collapse side bar", and click it, you can see it working.

But technically, @OrionStar25 is correct that this is confusing. I'll just note that this is something that's being added by the W3C's "inject.js" script, so it's technically not a ReSpec issue... but, we can definitely bring this issue to the W3C's attention so they can fix it on their side.

The project for that is: http://github.com/w3c/tr-design

it actually is functioning

:+1:

Actually, I lied, it's a ReSpec bug:
https://github.com/w3c/respec/blob/develop/src/core/structure.js#L147

@OrionStar25, you want to fix this?

Yeah! I'll work on this! :D

On 2 Mar 2018 8:15 am, "Marcos Cáceres" notifications@github.com wrote:

Actually, I lied, it's a ReSpec bug:
https://github.com/w3c/respec/blob/develop/src/core/structure.js#L147

@OrionStar25 https://github.com/orionstar25, you want to fix this?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/w3c/respec/issues/1545#issuecomment-369803171, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AbgACevKUpbjEO9VGNxOxYnr06dSRUleks5taLI0gaJpZM4SY-QB
.

@marcoscaceres So we want the TOC when the side panel exists and top of the spec when its been collapsed. Or we could just bring it to the top of the spec in both cases as TOC mostly is concise enough (?)
Also, there should be no point of it saying Back to top when it lands you to the TOC only, as thats not always the case.

No, let’s make it simpler. Just take the reader back to the very top of the document. Check if you can either hook into the #head or change the scroll position.

PR sent!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marcoscaceres picture marcoscaceres  Â·  6Comments

marcoscaceres picture marcoscaceres  Â·  5Comments

greenkeeper[bot] picture greenkeeper[bot]  Â·  4Comments

saschanaz picture saschanaz  Â·  6Comments

saschanaz picture saschanaz  Â·  5Comments