diff --git a/Sortable.js b/Sortable.js index 62c101a..fb4db18 100644 --- a/Sortable.js +++ b/Sortable.js @@ -55,6 +55,7 @@ moved, iframe_stash, + root_iframes, /** @const */ R_SPACE = /\s+/g, @@ -411,6 +412,16 @@ iframe_stash.appendChild(iframes[i]); } } + // stop iframes from stealing mouse events, to allow dragging on them + root_iframes = rootEl.querySelectorAll('iframe'); + if (root_iframes && root_iframes.length) + { + for (var i = 0; i < root_iframes.length; i++) + { + root_iframes[i].sortable_pe = root_iframes[i].style['pointer-events']; + root_iframes[i].style['pointer-events'] = 'none'; + } + } // Delayed drag has been triggered // we can re-enable the events: touchmove/mousemove @@ -917,6 +928,10 @@ } iframe_stash = null; } + // make iframes clickable again + for (var i = 0; i < root_iframes.length; i++) + root_iframes[i].style['pointer-events'] = root_iframes[i].sortable_pe; + root_iframes = []; if (evt) { if (moved) {