You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that Howler is running its event-based auto-enable on Chrome, all touch events are broken due to Chrome forcing document-level touch handlers to be passive.
Load any page that includes howler.js 2.0.14 and initializes a Howl object in Chrome, like any of the demos on https://howlerjs.com/.
If on desktop, enter mobile-emulation mode: open the DevTools (⌘ ⌥ i on Mac) and then the device toolbar (⌘ ⇧ m), and ensure "Mobile" is selected as the "Device type" (so that the typical mouse events are instead emulated touch events).
Try to interact with the document by clicking on any element, scrolling with the cursor, etc. — nothing will happen.
Howler's document-level touchstart event handler calls preventDefault on the event, but recent versions of Chrome force touchstart event handlers — and other potentially scroll-blocking handlers — to be passive (see the relevant item in the Chrome platform changelog). Passive events can't have their default actions prevented, so Howler's unlock handler throws an error which breaks that touch event and prevents interaction with the document.
This is affecting Chrome desktop and Chrome for Android version 56 and above, including web views on Android.
A quick fix would involve checking that unlock handler to make sure it isn't passive before preventing its default handler. However, it's unclear to me why the default handler should be prevented at all, as that unlock method seems like it should always be passive — perhaps that line can be removed altogether?
The text was updated successfully, but these errors were encountered:
I encountered this error in my app after I updated the library to v2.0.14 yesterday.
But, except for the error message, it looks like everything is still functioning on my app (the audio part).
Will anyone be kind enough to share the code on how can I implement a quick fix to get rid of the error message? Something we can just cut and paste the code - because some of us like me don't really understand how the audio part works. :-) Thank you so much in advance.
Now that Howler is running its event-based auto-enable on Chrome, all touch events are broken due to Chrome forcing document-level touch handlers to be passive.
(Clickable link from the image: https://www.chromestatus.com/features/5093566007214080)
To reproduce:
Howler's document-level
touchstart
event handler callspreventDefault
on the event, but recent versions of Chrome forcetouchstart
event handlers — and other potentially scroll-blocking handlers — to be passive (see the relevant item in the Chrome platform changelog). Passive events can't have their default actions prevented, so Howler'sunlock
handler throws an error which breaks that touch event and prevents interaction with the document.This is affecting Chrome desktop and Chrome for Android version 56 and above, including web views on Android.
A quick fix would involve checking that
unlock
handler to make sure it isn't passive before preventing its default handler. However, it's unclear to me why the default handler should be prevented at all, as thatunlock
method seems like it should always be passive — perhaps that line can be removed altogether?The text was updated successfully, but these errors were encountered: