#9594 closed bug (duplicate)
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/
- drag the draggable element somewhere within the frame
- scroll the frame
- 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!
Change History (7)
comment:1 Changed 9 years ago by
Status: | new → open |
---|---|
Summary: | draggable position bugged within iframe → Draggable: Jumps with relative/absolutely positioned iframe |
comment:2 Changed 9 years ago by
Milestone: | none → 1.11.0 |
---|---|
Resolution: | → fixed |
Status: | open → closed |
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.
comment:3 Changed 9 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:4 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Duplicate of #5727.
comment:5 follow-up: 6 Changed 9 years ago by
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 ;)
comment:6 follow-up: 7 Changed 9 years ago by
Replying to 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.
comment:7 Changed 9 years ago by
Replying to 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 :)
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.