Skip to main content

Search and Top Navigation

#11222 closed bug (duplicate)

Opened February 25, 2015 09:49AM UTC

Closed February 25, 2015 03:17PM UTC

Draggable Droppable Issue with IE when second time loading iframe document

Reported by: gaurav Owned by:
Priority: minor Milestone: none
Component: ui.droppable Version: 1.11.3
Keywords: Cc:
Blocked by: Blocking:
Description

Hi All,

I have raised Ticket #11204 for this issue. But it has been closed by marking it as duplicate of 7025 and 9421.

I am unable to post it on fiddler. I have tried of jsfiddle "http://jsfiddle.net/mbws1rq1/1/" but it is not replicating it as working on windows.

I request you to please replicate it on windows system rather then on jsfiddle.

[1] create page Main.html:

<head>    
    <title></title>
    <script src="http://code.jquery.com/jquery-1.11.2.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js" type="text/javascript"> </script>
    <script>



function bindDrop() {

        $("iframe").each(function () {
            var iframe = $(this).contents();
            iframe.find('#iframe_container').droppable(
                 {
                     iframeFix: true,
                     drop: function (event, ui) { alert('dropped'); }
                 });
        });

        $('#drag').removeClass("ui-draggable-dragging");
        $('#drag').draggable({ iframeFix: true, revert: true });
    }

    $(function () {
        bindDrop();
    });

    function ReloadFrmDoc() {
        $('#frameMain').attr('src', 'iframe.htm');
    }
    </script>
</head>
<body>
    <iframe src="iframe.htm" id="frameMain"></iframe>
    <div style="width: 20px; height: 20px; background-color: #808080" id="drag">
    </div>
    <button id="reload" text="Reload" onclick="ReloadFrmDoc();">ReLoad</button>
</body>
</html>

[2] Create iframe.htm

<head>
 <title></title>
  <script src="http://code.jquery.com/jquery-1.11.2.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js" type="text/javascript"> </script>
    <script>
 <script>
     $(function () {
         window.parent.bindDrop();
     });

 </script>
</head>
<body>

 <div id="iframe_container" style=" width: 40px; height: 40px; background-color: #0094ff">
 </div>

</body>
</html>

[3] Open Main.html in IE10 browser

[4] Click on "ReLoad" button.

[5] Now try to drag drop. the drag event is not getting called.

Please help.

I have tried to put following lines in jquery-ui.js

m[i].offset.top -= m[i].element.parents().find("html,body").scrollTop(); m[i].offset.left -= m[i].element.parents().find("html,body").scrollLeft();

iframe positioning if( this.current.options.iframeOffset ) {

m[i].offset.top += this.current.options.iframeOffset.top; m[i].offset.left += this.current.options.iframeOffset.left;

}

its not working as "scott.gonzalez" told in my previous Ticket.

Thanks

Gaurav

Attachments (0)
Change History (1)

Changed February 25, 2015 03:17PM UTC by scottgonzalez comment:1

resolution: → duplicate
status: newclosed

Duplicate of #7925.I never said it was working. I said it was not supported.