Console: Added non-passive event listener


Topic: Console: Added non-passive event listener

Łukasz Musznik premium asked 3 months ago

Expected behavior

clean console ;)

Actual behavior

console output: mdb.umd.min.js?15b7:7 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

Live example

https://mdb-vue-admin-dashboards.mdbgo.io/#/

Code

<MDBSideNav
    v-model="sidenavMDB"
    id="sidenavMDB"
    contentSelector="#page-content"
    :modeBreakpoint="1400"
    :closeOnEsc="true"
>
 tags || nothing
</MDBSideNav>

Mikołaj Smoleński staff commented 3 months ago

Thanks for posting an issue. We'll prepare a fix soon.

Keep coding,  Mikołaj from MDB


Dawid Wajszczuk staff answered 3 months ago

Hi,

We have checked this issue and there is not much we can do about it. To get rid of these warnings, turn off verbose mode in your console. We can't make these events passive because we use preventDefault in all of them and use our custom behavior. Making them passive will break our components. After all, these are just warnings, not errors and there should be no performance issue or code failure.

Keep coding,
Dawid


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Premium
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: MDB5 1.12.0
  • Device: PC
  • Browser: Chrome 101.0.4951.41
  • OS: Win 10
  • Provided sample code: No
  • Provided link: Yes