Opened 9 years ago
Closed 9 years ago
#10432 closed bug (invalid)
`scrollParent` context error when use iframe in 1.11.0
Reported by: | siyang | Owned by: | siyang |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.core | Version: | 1.11.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I write code to drag element from one document into iframe:
(I use iframe's jquery with parent document context)
`
var win_preview = document.getElementById('preview-iframe').contentWindow;
win_preview.jQuery('.selector', parent.document).draggable({
...
`
It works fine in v1.10.4, but when I update into 1.11.0, I find I can't get the offset. Then I track the bug, find out it caused by the return value in funcion
scrollParent
:
`
1.10.4
!scrollParent.length ? $(document) : scrollParent; |
1.11.0
!scrollParent.length ? $( this[ 0 ].ownerDocument | document ) : scrollParent; |
`
the return value is this[ 0 ].ownerDocument
in 1.11.0, and it's the iframe context, but I intend the parent document context.
Change History (2)
comment:1 Changed 9 years ago by
Owner: | set to siyang |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
using the owner document is correct. Please provide a reduced test case showing the problem.