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

Browser console ! warning : Unable to preventDefault inside passive event listener due to target being treated as passive. #283

Open
monecchi opened this issue May 19, 2017 · 2 comments

Comments

@monecchi
Copy link

monecchi commented May 19, 2017

I'm not sure if this is a bug or not, so I'd really appreciate if anyone could tell me why my Sly init method is triggering the following browser console warning on touch/dragging:

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.

Also should I be concerned about any lack of performance because of this issue?

Here's my sly initiation and options:

jQuery(function($) {
    'use strict';

var $frame  = $('#nav_menu');
var $slidee = $('#icon_nav_menu');
var $scrollbar = $('.scrollbar');

var sly = new Sly($frame, {
    slidee: $slidee,
    horizontal: true, 
    itemNav: 'basic',
    mouseDragging: 1, 
    dragging: 1,
    touchDragging: 1
    releaseSwing: 1,
    startAt: null, 
    scrollBar: $('.scrollbar'), 
    scrollBy: 1,
    scrollTrap: true,
    speed: 300,
    elasticBounds: 1,
    easing: 'linear', 
    dragHandle: 1, 
    dynamicHandle: 1
});

sly.on('load', function () {
    // check if there is nowhere to scroll
    if (sly.pos.start === sly.pos.end) {
        $scrollbar.hide();
    } else {
        $scrollbar.show();
    }
});

sly.init();

});
@Hlsgs
Copy link

Hlsgs commented Jun 22, 2017

See here.

@thanooshan
Copy link

thanooshan commented May 19, 2020

I also got this error. After i put touch-action: manipulation; for the frame element, then issue was resolved.

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

No branches or pull requests

3 participants