Skip to main content

Search and Top Navigation

#9594 closed bug (duplicate)

Opened October 09, 2013 04:24PM UTC

Closed October 11, 2013 01:28PM UTC

Last modified October 11, 2013 03:29PM UTC

Draggable: Jumps with relative/absolutely positioned iframe

Reported by: eithed Owned by:
Priority: minor Milestone: 1.11.0
Component: ui.draggable Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:
Description

Hi there,

I've tried using the draggable within an iframe, but unfortunately the positioning of the dragged element is offset, rendering it pretty much useless.

Please find the test case here: http://jsfiddle.net/bF6gf/

Another issue occurs, if the iframe is scrolled, which can be replicated here: http://jsfiddle.net/VpxVp/

1. drag the draggable element somewhere within the frame

2. scroll the frame

3. try dragging the element again

Tested under Chrome.

A possible solution is to use cursorAt and set it to the values of offset / scroll, though such solution seems hackish.

Cheers!

Attachments (0)
Change History (7)

Changed October 11, 2013 01:04PM UTC by tj.vantoll comment:1

status: newopen
summary: draggable position bugged within iframeDraggable: Jumps with relative/absolutely positioned iframe

Reduced: http://jsfiddle.net/tj_vantoll/fScJH/

This is only an issue when the

<iframe>
is positioned. I'm more concerned by the fact this use case completely fails in master; I'll create a separate ticket for that.

Changed October 11, 2013 01:16PM UTC by tj.vantoll comment:2

milestone: none1.11.0
resolution: → fixed
status: openclosed

I was mistaken. We only support creating widgets within iframes; we do not support creating widgets in one window and moving them to another.

Relatively positioned iframes are a problem in 1.10.3, but that issues has been fixed in master - http://jsfiddle.net/tj_vantoll/fScJH/. That fix will go out with 1.11.

Changed October 11, 2013 01:28PM UTC by tj.vantoll comment:3

resolution: fixed
status: closedreopened

Changed October 11, 2013 01:28PM UTC by tj.vantoll comment:4

resolution: → duplicate
status: reopenedclosed

Duplicate of #5727.

Changed October 11, 2013 01:46PM UTC by eithed comment:5

Thank you very much! It seems that both issues are indeed fixed with the git version. Can you please however note that the iframeFix cannot be used (I can't find the list of changes of 1.11, so don't know if it's being deprecated, either way - just a heads up).

I couldn't understand the note about moving widgets though - and as long as there's support for creating widgets within iframes, I'm fine with that ;)

Changed October 11, 2013 02:33PM UTC by tj.vantoll comment:6

Replying to [comment:5 eithed]:

Thank you very much! It seems that both issues are indeed fixed with the git version. Can you please however note that the iframeFix cannot be used (I can't find the list of changes of 1.11, so don't know if it's being deprecated, either way - just a heads up).
iframeFix
is intended to allow elements to be dragged on top of iframes, not allow elements within iframes to be dragged.
I couldn't understand the note about moving widgets though - and as long as there's support for creating widgets within iframes, I'm fine with that ;)

We do not support creating widgets and then moving them to different windows.

Changed October 11, 2013 03:29PM UTC by eithed comment:7

Replying to [comment:6 tj.vantoll]:

iframeFix
is intended to allow elements to be dragged on top of iframes, not allow elements within iframes to be dragged.

Ah, that explains the current behavior, though that means then that the behavior from the fiddled version is wrong (in that aspect). Either way the behavior of this attribute becomes inconsistent between versions.

We do not support creating widgets and then moving them to different windows.

But that's not happening here? Unless I'm missing something, the draggable widget is created within the iframe, with the script scope of parent window. There should be no dragging between the windows, yes, and that's fine :)