Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery UI: Droppable ('drop' event, tolerance: touch ) bug in safari (mac)
    primarykey
    data
    text
    <p>I am not able to solve the following problem: </p> <blockquote> <p>The below code works in all browsers of <strong>mac</strong> as well as windows, except that it <strong>works partially on macs safari(5.1.5)</strong>. </p> <p><strong>Note:</strong> It works on windows safari(5.1.5).</p> </blockquote> <p>This is the <strong>basic structure</strong>:</p> <p><img src="https://i.stack.imgur.com/Dztld.jpg" alt="enter image description here"></p> <pre><code>$(".div2" ).droppable({ accept: '.div1', tolerance: 'touch', drop: function(){ alert('dropped'); } }); </code></pre> <p>So, basically when <em>div1</em> touches <em>div2</em> , drop event should be triggered. </p> <p><img src="https://i.stack.imgur.com/m8oKX.jpg" alt="enter image description here"></p> <p>But the above case does not trigger the drop event.</p> <p>The only case (shown below) that triggers the drop event in macs safari is when the draggable div <em>div1</em> completely passes the droppable div <em>div2</em>. i just dont know why??</p> <p><img src="https://i.stack.imgur.com/69J7i.jpg" alt="enter image description here"></p> <blockquote> <p><strong>Versions used:</strong></p> <pre><code>jQuery: 1.7.2 jQuery UI: 1.8.18 Safari(mac): 5.1.5 </code></pre> <p><strong>update:</strong></p> <p>I tried other options of tolerance. Both '<em>touch</em>' and '<em>intersect</em>' do not work as desired. But '<em>pointer</em>' works perfectly fine.</p> <p>Is there any other way i could achieve the functionality of 'tolerance:touch'? I am thinking of detecting collision between 2 divs and then apply the corresponding logic.</p> </blockquote> <p>Any help will be appreciated.</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload