-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Violation error Added non-passive event listener to a scroll-blocking #12822
Comments
Hi @JokerMartini! 👋 It looks like you provided an invalid or unsupported reproduction URL. Without a proper reproduction, your issue will have to get closed. Thank you for your collaboration. 👏 |
Hi, I'm getting this same issue and its repro is so simple to see: just open QBtn component page in the official Quasar documentation and you'll see a bunch of them in the console (verbose required). From my quick research, I believe it has been introduced after this bug was reported: #12385 I believe it then generated this bug. |
So many comments and not even one that specifies OS/Browser + version |
In my case, I noticed it on my Macbook Air M1 running MacOS Monterey 12.3 on Chrome 99.0.4844.74 |
Because I cannot reproduce it on chrome dev on Linux and windows. |
I'm sorry but I just tried on Chrome 99.0.4844.82 on Windows (11) and I get the same warnings on the console (make sure to enable Verbose logging in the console to see them). If not, try a quick full refresh on the page as sometimes, I noticed that on first load, they do not appear somehow... |
I get this on windows desktop |
Ok, I found it, it's just on Qv2 because on Qv1 the listener is only attached when the device has touch. But this is just a cosmetic difference, the main problem is that in order to allow preventing the touch event the listener must not be passive. Maybe a way would be to check if there is a listener attached on QBtn and only the use non passive. |
Hi @pdanpdan could you point out where we should look at in the code so we can eventually submit a PR ? ;) thanks |
In here: quasar/ui/src/components/btn/QBtn.js Line 87 in 4a52a37
But I don't understand the root cause of the problem, because in Qv1 I don't get the warnings. |
I don't know either but I strongly believe it is related to the commit I mentioned previously in order to solve a bug: it seems to me that it shows that we are replacing |
Definitely related to the q-btn All pages that have a q-btn produce this error upon display |
Yeah this error still exists in all quasar projects i've been creating |
Same here, Desktop Ubuntu 20.04 (no touch there !) , Chrome 101.0.4951.64 (Official Build) (64-bit), Quasar v2.6.6 |
I'm also experiencing this error, on desktop, Linux, Quasar v2.7.1, it shows up only when the component/app is updated, not on loading, this could be related to the following piece of code
(QBtn.js) |
I'm still having this same problem... Windows 10 Pro, no touchscreen, node v16.15.1, quasar v2.7.7 |
I am also experiencing this warning. "node_modules/quasar": {
"version": "2.8.3" |
Same warnings in my Macbook Pro 2016, macOS Monterey 12.5.1, Chrome 104.0.5112.101 |
Fixed in cb2c64d for Qv2. Fix will be available in v2.8.5 and v1.21.0 |
Thanks a lot! |
Looks like this warning is still showing up whenever a QBtn with a |
Having same problem :loading prop is still giving warning.. in the meanwhile, any workaround that don't involve v-if/v-else?
|
You know, there are situations when that warning means exactly what it says. |
? |
It's a warning to check if what you did has a reason or not (in this case adding a non passive listener). And if you need to prevent default you need non passive |
yes, we need a way to set that event to passive, no point on having non passive loading event on btn by default. |
You mean you want the button to be still active while loading? Then just replace the content with a loading indicator |
I mean exactly what OP means but for loading |
To summarize:
|
idk what you mean, If I create literally a |
btw I did the button with a spinner inside on v-slot and still get warning message, idk if that's what you were saying, the only way to get around it is to do v-if/else with spinner instead of using loading, but that defeats the whole point of having a loading prop. |
Don't use the |
Forgot to mention that this bug only happens on electron, so can't make codepen |
Error in question is "Violation error Added non-passive event listener to a scroll-blocking", bug: quasarframework/quasar#12822
If you need the event to be non-passive, indicate so using the third parameter (set it to |
Getting this warning with Quasar
On a MacBook Pro |
What happened?
Created a new project and noticed that it produces tons of errors 'Added non-passive event listener to a scroll-blocking'. I'm not sure why this would be. I'm using the latest version of quasar for this project as of today it's the latest.
What did you expect to happen?
I dont expected to see so many errors.
Reproduction URL
Not applicable
How to reproduce?
Flavour
Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite), Electron Mode
Platforms/Browsers
Electron
Quasar info output
No response
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: