Is there a way to lock the page scroll when an event like mousemove is triggered? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Is there a way to lock the page scroll when an event like mousemove is triggered?

The page has to stop when the event is triggered, the page offsetTop being variable.

7th Jun 2020, 10:48 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
2 ответов
+ 5
most basic way is to set overflow to hidden for body tag. https://code.sololearn.com/WFetx733agyB/?ref=app
7th Jun 2020, 11:45 AM
Raj Chhatrala
Raj Chhatrala - avatar
0
Wow, it was that easy. 😅 Thanks!
7th Jun 2020, 11:56 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar