“Violation: Added non-passive event listener” when no JavaScript present
up vote
4
down vote
favorite
[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel'event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
I'm trying to understand this warning.
I've created the simplest of html files:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<select name="" id=""></select>
</body>
</html>
Running this in Chrome (Version 61.0.3163.100 (Official Build) (64-bit)), and clicking on the select element shows the above error in the console:
I've done some brief reading of other posts and there's a lot of times this is due to frameworks or after the js code ran preventDefault() on the event.
However, in the above example there is no javascript running, so surely there should be no error? The md doc referenced in the violation text states:
Developers can annotate touch and wheel listeners with passive: true to indicate that they will never invoke preventDefault
There are no touch and wheel listeners
in the file above.
javascript google-chrome passive-event-listeners
|
show 2 more comments
up vote
4
down vote
favorite
[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel'event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
I'm trying to understand this warning.
I've created the simplest of html files:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<select name="" id=""></select>
</body>
</html>
Running this in Chrome (Version 61.0.3163.100 (Official Build) (64-bit)), and clicking on the select element shows the above error in the console:
I've done some brief reading of other posts and there's a lot of times this is due to frameworks or after the js code ran preventDefault() on the event.
However, in the above example there is no javascript running, so surely there should be no error? The md doc referenced in the violation text states:
Developers can annotate touch and wheel listeners with passive: true to indicate that they will never invoke preventDefault
There are no touch and wheel listeners
in the file above.
javascript google-chrome passive-event-listeners
1
Maybe you have a chrome extension installed that's doing it? I don't see the warning in mine. (61.0.3163.100)
– zord
Oct 12 '17 at 20:01
1
I don't see the warning in mine. ... Thanks @zord, that leads me to believe it must be some sort of local issue. I'll test on some other computers tomorrow.
– Stu
Oct 12 '17 at 20:08
1
@Stu I also don't see that issue. (same version, 61.0.3163.100)
– Nathan Hinchey
Oct 12 '17 at 20:09
2
I'm seeing the same thing... In fact this question came up as relevant when I was typing mine. I'll look at my extensions. Comforting to know that it's not in my code. :)
– Stijn de Witt
Jan 23 at 15:14
2
this comes from chrome core not from an extension. After a new DOM specification for new browsers this is warning.
– mtizziani
Apr 20 at 8:46
|
show 2 more comments
up vote
4
down vote
favorite
up vote
4
down vote
favorite
[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel'event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
I'm trying to understand this warning.
I've created the simplest of html files:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<select name="" id=""></select>
</body>
</html>
Running this in Chrome (Version 61.0.3163.100 (Official Build) (64-bit)), and clicking on the select element shows the above error in the console:
I've done some brief reading of other posts and there's a lot of times this is due to frameworks or after the js code ran preventDefault() on the event.
However, in the above example there is no javascript running, so surely there should be no error? The md doc referenced in the violation text states:
Developers can annotate touch and wheel listeners with passive: true to indicate that they will never invoke preventDefault
There are no touch and wheel listeners
in the file above.
javascript google-chrome passive-event-listeners
[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel'event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
I'm trying to understand this warning.
I've created the simplest of html files:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<select name="" id=""></select>
</body>
</html>
Running this in Chrome (Version 61.0.3163.100 (Official Build) (64-bit)), and clicking on the select element shows the above error in the console:
I've done some brief reading of other posts and there's a lot of times this is due to frameworks or after the js code ran preventDefault() on the event.
However, in the above example there is no javascript running, so surely there should be no error? The md doc referenced in the violation text states:
Developers can annotate touch and wheel listeners with passive: true to indicate that they will never invoke preventDefault
There are no touch and wheel listeners
in the file above.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<select name="" id=""></select>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<select name="" id=""></select>
</body>
</html>
javascript google-chrome passive-event-listeners
javascript google-chrome passive-event-listeners
edited Nov 11 at 0:07
Kevin Reid
14.9k45276
14.9k45276
asked Oct 12 '17 at 19:56
Stu
3,8751539
3,8751539
1
Maybe you have a chrome extension installed that's doing it? I don't see the warning in mine. (61.0.3163.100)
– zord
Oct 12 '17 at 20:01
1
I don't see the warning in mine. ... Thanks @zord, that leads me to believe it must be some sort of local issue. I'll test on some other computers tomorrow.
– Stu
Oct 12 '17 at 20:08
1
@Stu I also don't see that issue. (same version, 61.0.3163.100)
– Nathan Hinchey
Oct 12 '17 at 20:09
2
I'm seeing the same thing... In fact this question came up as relevant when I was typing mine. I'll look at my extensions. Comforting to know that it's not in my code. :)
– Stijn de Witt
Jan 23 at 15:14
2
this comes from chrome core not from an extension. After a new DOM specification for new browsers this is warning.
– mtizziani
Apr 20 at 8:46
|
show 2 more comments
1
Maybe you have a chrome extension installed that's doing it? I don't see the warning in mine. (61.0.3163.100)
– zord
Oct 12 '17 at 20:01
1
I don't see the warning in mine. ... Thanks @zord, that leads me to believe it must be some sort of local issue. I'll test on some other computers tomorrow.
– Stu
Oct 12 '17 at 20:08
1
@Stu I also don't see that issue. (same version, 61.0.3163.100)
– Nathan Hinchey
Oct 12 '17 at 20:09
2
I'm seeing the same thing... In fact this question came up as relevant when I was typing mine. I'll look at my extensions. Comforting to know that it's not in my code. :)
– Stijn de Witt
Jan 23 at 15:14
2
this comes from chrome core not from an extension. After a new DOM specification for new browsers this is warning.
– mtizziani
Apr 20 at 8:46
1
1
Maybe you have a chrome extension installed that's doing it? I don't see the warning in mine. (61.0.3163.100)
– zord
Oct 12 '17 at 20:01
Maybe you have a chrome extension installed that's doing it? I don't see the warning in mine. (61.0.3163.100)
– zord
Oct 12 '17 at 20:01
1
1
I don't see the warning in mine. ... Thanks @zord, that leads me to believe it must be some sort of local issue. I'll test on some other computers tomorrow.
– Stu
Oct 12 '17 at 20:08
I don't see the warning in mine. ... Thanks @zord, that leads me to believe it must be some sort of local issue. I'll test on some other computers tomorrow.
– Stu
Oct 12 '17 at 20:08
1
1
@Stu I also don't see that issue. (same version, 61.0.3163.100)
– Nathan Hinchey
Oct 12 '17 at 20:09
@Stu I also don't see that issue. (same version, 61.0.3163.100)
– Nathan Hinchey
Oct 12 '17 at 20:09
2
2
I'm seeing the same thing... In fact this question came up as relevant when I was typing mine. I'll look at my extensions. Comforting to know that it's not in my code. :)
– Stijn de Witt
Jan 23 at 15:14
I'm seeing the same thing... In fact this question came up as relevant when I was typing mine. I'll look at my extensions. Comforting to know that it's not in my code. :)
– Stijn de Witt
Jan 23 at 15:14
2
2
this comes from chrome core not from an extension. After a new DOM specification for new browsers this is warning.
– mtizziani
Apr 20 at 8:46
this comes from chrome core not from an extension. After a new DOM specification for new browsers this is warning.
– mtizziani
Apr 20 at 8:46
|
show 2 more comments
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46717866%2fviolation-added-non-passive-event-listener-when-no-javascript-present%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46717866%2fviolation-added-non-passive-event-listener-when-no-javascript-present%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Maybe you have a chrome extension installed that's doing it? I don't see the warning in mine. (61.0.3163.100)
– zord
Oct 12 '17 at 20:01
1
I don't see the warning in mine. ... Thanks @zord, that leads me to believe it must be some sort of local issue. I'll test on some other computers tomorrow.
– Stu
Oct 12 '17 at 20:08
1
@Stu I also don't see that issue. (same version, 61.0.3163.100)
– Nathan Hinchey
Oct 12 '17 at 20:09
2
I'm seeing the same thing... In fact this question came up as relevant when I was typing mine. I'll look at my extensions. Comforting to know that it's not in my code. :)
– Stijn de Witt
Jan 23 at 15:14
2
this comes from chrome core not from an extension. After a new DOM specification for new browsers this is warning.
– mtizziani
Apr 20 at 8:46