Skip to content

Instantly share code, notes, and snippets.

@ntnyq
Created July 31, 2019 15:22
Show Gist options
  • Save ntnyq/396f6c8b1744590ebcf903d0e5cb5e4c to your computer and use it in GitHub Desktop.
Save ntnyq/396f6c8b1744590ebcf903d0e5cb5e4c to your computer and use it in GitHub Desktop.
[Passive event warning] #JavaScript

滑动时页面警告

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.

解决方法

* {
    -ms-touch-action: pan-y;
    touch-action: pan-y;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment