Skip to content
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

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

Open
WalterB-MAMC opened this issue Feb 1, 2024 · 0 comments
Open

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

WalterB-MAMC opened this issue Feb 1, 2024 · 0 comments

Comments

@WalterB-MAMC
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant