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

Spec's markup is hostile to sane anchor use #732

Closed
bzbarsky opened this Issue Nov 16, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@bzbarsky

bzbarsky commented Nov 16, 2016

STEPS TO REPRODUCE:

  1. Load https://tc39.github.io/ecma262/#sec-json.stringify
  2. Click the "List" link in step 1 to go to https://tc39.github.io/ecma262/#sec-list-and-record-specification-type
  3. Hit the browser's back button

EXPECTED RESULTS: Browser scrolls back to JSON.stringify algorithm.

ACTUAL RESULTS: Nothing happens.

ADDITIONAL INFORMATION: The entire body of the spec is inside the <div id="spec-container"> thing which has "overflow-y: auto". So when scrolling in step 2 above, that div is what gets scrolled, not the main viewport. But session history in browsers only stores the scroll position of the viewport. As a result, when traversing back in history there is no scrolling happening in this case. The upshot is that you can't get back to where you came from, which is really annoying.

Ideally the spec would use the viewport scrollbars as its main mechanism, not the scrollbars of some random div in the page.

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Nov 18, 2016

Member

I'm attempting a fix this weekend. Unfortunately the container was added to work around crazy perf issues, but fortunately I think I can simply apply the same fix to body, and also if that doesn't work I got some additional workarounds from helpful folks on twitter that I can try.

Member

bterlson commented Nov 18, 2016

I'm attempting a fix this weekend. Unfortunately the container was added to work around crazy perf issues, but fortunately I think I can simply apply the same fix to body, and also if that doesn't work I got some additional workarounds from helpful folks on twitter that I can try.

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Nov 21, 2016

Member

I worked on this some but there is no easy fix - fixes either introduce new layout bugs in various browsers, or regress experience in other ways (eg. scrolling toc to top/bottom starts scrolling main spec body). Still working on it.

Member

bterlson commented Nov 21, 2016

I worked on this some but there is no easy fix - fixes either introduce new layout bugs in various browsers, or regress experience in other ways (eg. scrolling toc to top/bottom starts scrolling main spec body). Still working on it.

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Nov 23, 2016

Member

Fixed in emu 3.7.2 (rendered spec updated as well).

Member

bterlson commented Nov 23, 2016

Fixed in emu 3.7.2 (rendered spec updated as well).

@bterlson bterlson closed this Nov 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment