FL3NKEY / scroll-lock

🔨 Cross-browser JavaScript library to disable scrolling page

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

many errors in console

oleksandr-dukhovnyy opened this issue · comments

Found a bug while using. When (for example, a menu) is scrolled to the maximum, but the user continues to drag his finger, then a large number of errors of the form start to appear in the console:
"[Intervention] Ignored attempt to cancel a touchmove event with cancelable = false, for example because scrolling is in progress and cannot be interrupted."
The solution is very simple by adding one condition before e.PreventDefault()

if (e.cancelable) { e.preventDefault(); }