Skip to main content

Search and Top Navigation

#10432 closed bug (invalid)

Opened July 28, 2014 01:51AM UTC

Closed August 12, 2014 08:37AM UTC

`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

return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;

// 1.11.0

return position === "fixed" || !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.

Attachments (0)
Change History (2)

Changed July 28, 2014 07:44PM UTC by scottgonzalez comment:1

owner: → siyang
status: newpending

using the owner document is correct. Please provide a reduced test case showing the problem.

Changed August 12, 2014 08:37AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

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!