1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-04 06:48:49 +02:00

fix(event): event polyfill detection compatibility with react-native-web (#7286)

Fixes #7259
This commit is contained in:
Alec Winograd 2021-06-24 15:54:02 -05:00 committed by GitHub
parent 4cecbdab45
commit a221be1d83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ export function fixEvent(event) {
// But native events return true for stopPropagation, but don't have
// other expected methods like isPropagationStopped. Seems to be a problem
// with the Javascript Ninja code. So we're just overriding all events now.
if (!event || !event.isPropagationStopped) {
if (!event || !event.isPropagationStopped || !event.isImmediatePropagationStopped) {
const old = event || window.event;
event = {};