6/12/2023 0 Comments Smoothscroll google chrome![]() There are various different ways of enabling smooth scrolling depending on the browser you are using. That’s why the browsers are at the forefront when it comes to smooth scrolling. The most common use of scroll (in general) is on the internet while reading the contents of a webpage. What is smooth scrolling and how to enable/disable it? How to enable smooth scroll? The choppy scroll might be annoying for a lot of users and that’s why people are moving towards the smooth scroll option. This might not be a huge deal for you but it is a big deal for users who read a lot of long pages. With smooth scrolling, it slides down smoothly, so you can see how much it scrolls. When this feature is enabled, pressing the Page Down button won’t just jump directly down one page. Smooth scrolling is also useful with keyboard shortcuts. Enabling smooth scroll allows you to scroll like that with your regular wheel scroll. ![]() If you press the mouse scroll wheel, you can move your mouse up/down and the scroll will be very smooth. The best way to describe the smooth scroll is to compare the regular mouse scroll with the scroll when the scroll wheel is pressed. When smooth scrolling is turned on, you’ll notice that the scrolling is a lot smoother and it won’t stop suddenly when you stop scrolling but rather scroll a bit past your scrolling point that will make the scroll a lot smoother. That’s why major applications like Google Chrome have introduced a new feature named smooth scrolling. The usual/normal scrolling is a bit choppier and might stop suddenly. You can temporarily see it live here.Įdit: Observation - the whole issue appears to be Chrome trying to preserve old scrollTop position despite Javascript changing it to new one.You might have heard the term smooth scrolling on the internet and wondered what exactly is this? If you aren’t sure, smooth scrolling, as its name indicates, is a feature that allows you to scroll smoothly. I could not use the inline preview because it needs URL with fragment. Keep clicking and if you see RED BACKGROUND FLASH you can reproduce the problem.ĭ = When you start on top and hit CTRL+R then it stays on top while briefly jumping on the very bottom of the page. ![]() When you start on the bottom and you hit "CTRL+R" it stays on the bottom. Note: It appears that Chrome simply restores initial scroll position. Page jumps on the bottom - becomes briefly red - and then jumps back up and stays white.Both scrollTop modification and fragment reference jumps on the bottom - page stays red (does not work).Fragment reference jumps on the bottom - page stays red (works).Javscript scrollTop modifications jumps on the bottom - page stays red (works).It is only when both mechanisms are used that it does not work. When there is only '#bottom' fragment without javascript or only javascript without '#bottom' fragment all works as expected - page is red as it scrolls on the very bottom. Page jumps on the bottom (there is a red div - it flashes red) and then immediately back on top (becomes white again). When both conditions are true then the problem happens. Javascript will try to scroll on the very bottom of the page as well using html.scrollTop.There must be a fragment in URL '#bottom' referencing an element on very bottom of the page.I am fighting with weird Chrome behavior, when page loads it jumps on the bottom of the page and then immediately back up to top.
0 Comments
Leave a Reply. |