plyr icon indicating copy to clipboard operation
plyr copied to clipboard

Progress range cause errors on touch devices

Open interlark opened this issue 5 years ago • 1 comments

Expected behaviour

No errors

Actual behaviour

Errors on touch

Steps to reproduce

Just click below progress range on a touch device

Environment

  • Browser: Chrome
  • Version: 87
  • Operating System: Linux

Console errors (if any)

[Intervention] Ignored attempt to cancel a touchstart event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

rangetouch.js related ?

Link to where the bug is happening

https://plyr.io/

bug_error

interlark avatar Dec 05 '20 19:12 interlark

It's a bug of rangetouch, 'event.preventDefault()' need judge event.cancelable.

set(event) {
    if (!RangeTouch.enabled || !is.event(event) || event.target.disabled) {
        return;
    }

    // Prevent text highlight on iOS
    event.preventDefault();

    // Set value
    // eslint-disable-next-line no-param-reassign
    event.target.value = this.get(event);

    // Trigger event
    trigger(event.target, event.type === 'touchend' ? 'change' : 'input');
}

iyiyl avatar Aug 01 '24 06:08 iyiyl