AdminLTE icon indicating copy to clipboard operation
AdminLTE copied to clipboard

[BUG] push-menu.ts uses 'touchstart' in non-passive mode

Open WalterB-MAMC opened this issue 2 years ago • 2 comments

The developer console reports the push-menu.ts files uses of touchstart as an issue as it does not allow for passive mode. This is a scroll-blocking event and makes the page less responsive. It needs {passive: true} to be added to the event listener like the following:

sidebarOverlay.addEventListener('touchstart', '{passive: true}', event => {
    event.preventDefault()
    const target = event.currentTarget as HTMLElement
    const data = new PushMenu(target, Defaults)
    data.collapse()
  })

More details on this can be found here

WalterB-MAMC avatar Feb 01 '24 04:02 WalterB-MAMC

Please Create PR for this

danny007in avatar May 18 '24 11:05 danny007in

The PR #5583 has been created for this issue. I accidently submitted this issue with my work account.

burdittw avatar May 24 '24 02:05 burdittw