This is a migrated thread and some comments may be shown as answers.

Preserve iframe content when dragging

2 Answers 212 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 21 Jun 2016, 11:37 PM

Hi,

I have an issue with draggable ui element. I'm trying to achieve following:

 

- I have a widget that essentially a div (no plugins).

- I have an iframe inside that div.

- I applied draggable to that widget

$(widget).kendoDraggable({
                           hint: function (element) {
                               return element.clone();
                           }
                       });

I need to see widget when I drag it around. This is why I use 'hint' but because it's a copy of original iframe, it doesn't preserve it's state, it reloads the whole page again, and if user navigated inside the iframe, lets say he scrolled, it's not even the same look.

Is there any possibility that I can drag the same element but not the copy?

Thank you.

2 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 24 Jun 2016, 06:27 AM

Hello Sergey,

I am afraid that this behavior is not supported. Even if the element stays the same, the Draggable will move it in the DOM, which will reload the iframe. Consider using a text representation of the state of the iframe instead of dragging its element.

Regards,
Alex Gyoshev
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Sergey
Top achievements
Rank 1
answered on 24 Jun 2016, 08:35 AM
I had to use Jquery UI draggable to do what I need. Unfortunately, I couldn't make it work with Kendo UI. 
Tags
Drag and Drop
Asked by
Sergey
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Sergey
Top achievements
Rank 1
Share this question
or