Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
docs: Fix documentation and browser back button issue#5716
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
evanlucas commented Mar 15, 2016
Thanks for the contribution! This actually breaks scrolling completely for me in Chrome on OS X, so I think we will have to find a different solution. |
pittyplatsch commented Mar 15, 2016
@evanlucas Indeed, for me (FF on Ubuntu) too. Didn't even notice that, was just happy that the browser behaviour was as expected. |
pittyplatsch commented Mar 15, 2016
Some more changes. Scrolling now functional again, sorry for my earlier ignorance. |
Fishrock123 commented Mar 15, 2016
cc @nodejs/documentation |
silverwind commented Mar 15, 2016
Looks to be working in Firefox, Chrome and Safari on OS X. Will test on Windows later. |
jasnell commented Mar 16, 2016
LGTM |
silverwind commented Mar 16, 2016
@pittyplatsch tested in IE10, Chrome, Firefox on Windows and noticed one regression: scrolling the sidebar all the way to the bottom in Chrome (all platforms) and IE "bubbles" the scroll to the main section. |
pittyplatsch commented Mar 17, 2016
@silverwind I see what you mean but don't think it's unnatural or unexpected behaviour that the scrolling continues in the main |
silverwind commented Mar 17, 2016
@pittyplatsch FWIW, the scrolling issue was reported as a bug here, I don't really want to introduce it again. Is it not possible to fix both issues? |
silverwind commented Mar 18, 2016
Maybe something like this is in order to prevent the scroll "bubbling". The functionscroll(e){vardelta=(e.type==='mousewheel') ? e.wheelDelta : e.detail*-40;if(delta<0&&(this.scrollHeight-this.offsetHeight-this.scrollTop)<=0){this.scrollTop=this.scrollHeight;e.preventDefault();}elseif(delta>0&&delta>this.scrollTop){this.scrollTop=0;e.preventDefault();}}document.getElementById('column2').addEventListener('mousewheel',scroll);document.getElementById('column2').addEventListener('DOMMouseScroll',scroll); |
stevemao commented Mar 22, 2016
cc @nodejs/website |
stevemao commented Mar 22, 2016
@pittyplatsch interesting. I didn't know css position would break history buttons with anchor links. Any references on this? |
pittyplatsch commented Mar 23, 2016
@silverwind Thanks for linking nodejs/nodejs.org#513 – interesting insights. I personally have no problem with the bubbling, on FF there's a delay which seems like a nice compromise. I too found people discussing using JS to influence the browsers default behaviour (http://stackoverflow.com/questions/5802467/prevent-scrolling-of-parent-element) and also browser developers are discussing it: https://bugs.chromium.org/p/chromium/issues/detail?id=162179. Personally I don't think it's necessary. @stevemao Only came across it in this particular case. It drives me crazy and I was surprised it hasn't been mentioned before by someone else. |
jasnell commented Apr 21, 2016
What's the status on this one? |
silverwind commented Apr 21, 2016 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I'd sign it off if a solution to the scroll bubble issue is provided, be it #5716 (comment) or (preferably) a CSS only solution. |
pittyplatsch commented Apr 22, 2016
Sorry, I won't fix the bubbling. Take it as it is or feel free to close it... |
silverwind commented Apr 22, 2016
In that case, I'll have to close it as it fixes one issue, but regresses another. The issue is not forgotten, thought. I have a few minor tweaks to docs CSS in mind, and I'll try to work out something regarding this problem. |
Moved the sidebar to a fixed position and moved the positioning of the main content to the page's body, which results in back/forward navigation through hash links and search highlight working again. Fixes: nodejs#6637 Based on: nodejs#5716
Moved the sidebar to a fixed position and moved the main column to the page's body, which results in back/forward navigation through hash links and search highlight working again. Fixes: #6637Fixes: #6751 Based on: #5716 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Robert Lindstaedt <[email protected]>
Moved the sidebar to a fixed position and moved the main column to the page's body, which results in back/forward navigation through hash links and search highlight working again. Fixes: nodejs#6637Fixes: nodejs#6751 Based on: nodejs#5716 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Robert Lindstaedt <[email protected]>
Moved the sidebar to a fixed position and moved the main column to the page's body, which results in back/forward navigation through hash links and search highlight working again. Fixes: #6637Fixes: #6751 Based on: #5716 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Robert Lindstaedt <[email protected]>
Moved the sidebar to a fixed position and moved the main column to the page's body, which results in back/forward navigation through hash links and search highlight working again. Fixes: #6637Fixes: #6751 Based on: #5716 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Robert Lindstaedt <[email protected]>
Moved the sidebar to a fixed position and moved the main column to the page's body, which results in back/forward navigation through hash links and search highlight working again. Fixes: #6637Fixes: #6751 Based on: #5716 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Robert Lindstaedt <[email protected]>
I couldn't find any other issue or discussion thread but I'm new to Node and therefore spending a lot of time with the docs. It's quite annoying that the browser back button is not working when one has jumped to an anchor within a page and then wanting to go back to the index with the browser back functionality. Removing the suggested line fixes the issue. I don't really know what it's good for, so if anyone could tell me and propose a different fix I'd be happy too.