javascript - jQuery draggable won't automatically scroll iframe down -


i have iframe several draggable divs inside. when dragging items want iframe automatically scroll , down when needs to, scrolls up. have tried scroll option set true doesn't work.

iframe page following repeated enough allow page scroll (https://jsfiddle.net/zhm6qjaz/):

<div class="block-style">     header </div> 

the main page code ( https://jsfiddle.net/hulr2zkv/ ):

<iframe id="editor-frame" src="https://jsfiddle.net/zhm6qjaz/show" style="height:500px; width:100%; border:none;"></iframe> <script>$(document).ready(function() {      $('#editor-frame').load(function (event) {          var iframe = $('#editor-frame').contents();          iframe.find('.block-style').draggable({             delay: 200,             helper: "clone",             iframefix: true,             iframeoffset: $('#editor-frame').offset(),             appendto: 'parent.body',             start: function (event, ui) {                 $(this).addclass('selected');             },             drag: function (event, ui) {             },             stop: function (event, ui) {                 $(this).removeclass('selected');             }         });          iframe.find('.block-style', window.top.document).droppable({             tolerance: "pointer",             iframefix: true,             over: function (event, ui) {             },             out: function (event, ui) {                            },             drop: function (event, ui) {             }         });      });  });</script> 

i'm not sure else try, guess not expected behaviour , when dragging down in iframe should automatically scroll?


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -