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

Chrome on Android logs error about preventDefault inside passive event listener when scrubbing #4650

Closed
MattiasBuelens opened this issue Oct 6, 2017 · 7 comments

Comments

@MattiasBuelens
Copy link
Contributor

MattiasBuelens commented Oct 6, 2017

Description

Chrome on Android logs the following error in the browser console when the user starts scrubbing: "Unable to preventDefault inside passive event listener invocation."

JSBin (In case JSBin is unavailable: simply set up a starter template and use the latest version of video.js)

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Do one of these:
  • Open a page with video.js in Chrome or Android. Start a remote debugger from Chrome on desktop.
  • Open a page with video.js in Chrome on desktop. Open the Chrome DevTools and use the device toolbar to emulate an Android phone (e.g. Galaxy S5).
  1. Click play
  2. Scrub a couple of time on the seekbar

Results

Expected

No errors are logged to the browser console.

Actual

The browser console shows multiple errors with the message: "Unable to preventDefault inside passive event listener invocation."

Error output

Unable to preventDefault inside passive event listener invocation.
event.preventDefault @ video.js:22647
handleMouseDown @ video.js:13249
handleMouseDown @ video.js:4436
bound @ video.js:23004
data.dispatcher @ video.js:22790

Additional Information

It appears that Slider.handleMouseDown is registered as a passive event listener for touchstart, but still calls event.preventDefault().

Fortunately, this doesn't break the player: Chrome simply logs an error but continues executing the rest of the code. It would be nice if video.js could avoid logging these errors though. 😄

versions

videojs

  • 5.20.2
  • 6.2.4

browsers

  • Chrome 61 on Android
  • Chrome 61 on desktop (when emulating Android)

OSes

  • Android

plugins

None

@Yalhu
Copy link

Yalhu commented Oct 11, 2017

i have the same problem on mobile with videojs 6.2.1.
error :The play() request was interrupted by a call to pause() doesn't show on #4319 .There is only one error last Unable to preventDefault inside passive event listener invocation.

if it's done , please mark me. Thanks.

@AntonioPrimera
Copy link

I can confirm this behaviour in the Chrome Developer Tools - Responsive Mode.
It doesn't seem to break the player, but it quickly fills the console with the following 2 error messages:
The play() request was interrupted by a call to pause()
Unable to preventDefault inside passive event listener invocation.

@yoshz
Copy link

yoshz commented Feb 20, 2018

Same problem here.

@CallumBrankin
Copy link

Same, version 6.8.0. This needs to be fixed!

@gkatsev gkatsev closed this as completed in 59869b9 Jun 5, 2018
gkatsev pushed a commit that referenced this issue Jun 5, 2018
…ubbing (#5219)

Instead of calling preventDefault() on touchstart in Chrome, set touch-action: none style on progress control to prevent unintended scrolling.

Fixes #4650.
@BonBonSlick
Copy link

BonBonSlick commented Aug 17, 2019

STILL EXISTS in "video.js": "^7.6.0",


video.es.js:1707 Unable to preventDefault inside passive event listener invocation.
event.preventDefault @ video.es.js:1707
handleMouseDown @ video.es.js:12222
handleMouseDown @ video.es.js:13085
bound @ video.es.js:2221
data.dispatcher @ video.es.js:1845
video.es.js:1711 Unable to preventDefault inside passive event listener invocation.

@LucasZNK
Copy link

LucasZNK commented Jul 13, 2021

STILL EXISTS in "video.js": "^7.6.0",


video.es.js:1707 Unable to preventDefault inside passive event listener invocation.
event.preventDefault @ video.es.js:1707
handleMouseDown @ video.es.js:12222
handleMouseDown @ video.es.js:13085
bound @ video.es.js:2221
data.dispatcher @ video.es.js:1845
video.es.js:1711 Unable to preventDefault inside passive event listener invocation.

Hi @BonBonSlick , you found a fix ? im getting the same issue now. with "video.js": "7.12.3", fast forward the video, but in mobile this does not work.

@ghazalhafezi
Copy link

STILL EXISTS in "video.js": "^7.6.0",


video.es.js:1707 Unable to preventDefault inside passive event listener invocation.
event.preventDefault @ video.es.js:1707
handleMouseDown @ video.es.js:12222
handleMouseDown @ video.es.js:13085
bound @ video.es.js:2221
data.dispatcher @ video.es.js:1845
video.es.js:1711 Unable to preventDefault inside passive event listener invocation.

Hi @BonBonSlick , you found a fix ? im getting the same issue now. with "video.js": "7.12.3", fast forward the video, but in mobile this does not work.

Hi
are you solved this problem? same here

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants