Drag & Drop on IPad Web App - while remaining Scroll functionality

前端 未结 2 538
孤城傲影
孤城傲影 2021-02-09 06:34

I am using Jquery UI Drag and Drop ( http://jqueryui.com/demos/draggable ) together with https://github.com/furf/jquery-ui-touch-punch to map touch events over to mouse events.

2条回答
  •  终归单人心
    2021-02-09 07:16

    I solved this by switching from https://github.com/furf/jquery-ui-touch-punch to the code in this solution: Javascript Drag and drop for touch devices.

    In the end all I needed to adjust was to remove the event.preventDefault(); to re-enable scolling.

    Edit

    Basically I used the code from the second answer I linked - with some adjustments. Here is the JS fiddle of my solution, hope it helps: http://jsfiddle.net/LQuyr/8/

提交回复
热议问题