Jump to content
Search Community

KikeFront

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by KikeFront

  1. Hi all, i get this error on the console ON MOBILE getting document.elementsFromPoint(posX, posY). On Chrome on desktop it works nice :(

     

    Quote

    Uncaught TypeError: Failed to execute 'elementsFromPoint' on 'Document': The provided double value is non-finite.
        at Ta.onDrag ((index):48)
        at ja (Draggable.min.js:14)
        at Array.db (Draggable.min.js:14)
        at Object.O (Draggable.min.js:14)
        at Object.i.dispatchEvent (TweenMax.min.js:16)
        at s (TweenMax.min.js:16)

     

     

    My code:

    Quote
    let dragItem = Draggable.create(".drag", {
    type: "x,y",
    bounds: ".configurator",
    onDrag: function(event) {
    // TODO: On Mobile document.elementsFromPoint causes ERROR.
    posX = parseInt(event.clientX);
    posY = parseInt(event.clientY);
    overElement = document.elementsFromPoint(posX, posY);
    }
    });

     

    I have the example with the error on jsfiddle:

    http://jsfiddle.net/equerol/92j45hd0/21/

     

     

    See the Pen 21 by equerol (@equerol) on CodePen

×
×
  • Create New...