C
C
choi38372021-10-23 12:06:05
JavaScript
choi3837, 2021-10-23 12:06:05

How to fix the error when scrolling the site?

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/6662647093133312
preventDefault @ jquery.min.js?ver=3.6.0:2
(anonymous) @ theme-scripts.js?ver=1:94
dispatch @ jquery.min. js?ver=3.6.0:2
v.handle @ jquery.min.js?ver=3.6.0:2
6173d04b02dee725881221.png

This error occurs when scrolling the site in the google chrome browser, visually the site trembles when scrolling the site

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-10-23
@Aleksandr-JS-Developer

In short, someone hung a handler on the scroll event like this:

elem.addEventListener("scroll", (e) => {...}, {passive: true});

and called e.preventDefault();inside the handler.
If more similar:
MDN
In particular, about improving the scroll

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question