How to disable smooth scrolling in Chrome

I am building a web application (which mainly focuses on use in Chrome), but "smooth scrolling" (I assume that he called "extra" scrolling, like on iOS) Chrome (when on Mac) is in the way.

Is there any way to disable this via javascript?

+4
source share
3 answers

What you call smooth scrolling is called scrolling rollback or rubber tape scrolling.

Disable iOS Overscroll, but allow body scrolling

+1
source

I was able to mitigate some rendering problems that I had with smooth scrolling by intercepting wheel events and moving the scrollTop / scrollLeft pixel positions manually:

 function wheeled(event) { event.preventDefault() container.scrollTop += event.deltaY container.scrollLeft += event.deltaX } container.addEventListener('wheel', wheeled, { passive: false, capture: true }) // actual render code is in the `scrolled` handler because // there are other wheel events in the code that adjust the scroll position container.addEventListener('scroll', scrolled, { passive: true }) 
+1
source

Use Javascript to set the CSS style for HTML and BODY tags.

Set the overflow property to hidden.

0
source

Source: https://habr.com/ru/post/1438011/


All Articles