Ticket #4534 (closed bug: fixed)

Opened 6 years ago

Last modified 4 years ago

UI Dialog causing iframe to reload content every time 'show' is called

Reported by: bgrinstead Owned by:
Priority: minor Milestone: 1.8.6
Component: ui.dialog Version: 1.7.1
Keywords: iframe show dialog Cc:
Blocking: Blocked by:

Description

I recently ran into this problem. Basically, if you have an iframe inside your dialog content, every time you reshow the dialog, it reloads the iframe. This is unexpected and incorrect behavior. I have tracked down the change in the open function:

(uiDialog.next().length && uiDialog.appendTo('body'));

This line works - the iframe does not reload because the DOM is not being manipulated, I guess?

(uiDialog.parent().not('body').length && uiDialog.appendTo('body'));

Note: I found the fix here:  http://www.nabble.com/-jquery.ui.dialog--Dailog-with-a-lot-of-HTML-unbearably-slow-td21257084s27240.html

Please take a look at this!

Thanks, Brian Grinstead

Change History

comment:1 Changed 6 years ago by joern.zaefferer

  • Milestone changed from TBD to 1.8

comment:2 Changed 5 years ago by burnrbr

I experienced the same issue in Firefox.

I changed this code:

(uiDialog.next().length && uiDialog.appendTo('body'));

To:

if (uiDialog.next().length && uiDialog.get(0).parentNode != document.body) {

uiDialog.appendTo('body');

}

comment:3 Changed 5 years ago by Rwhitbeck

  • Milestone changed from 1.8 to 1.next

comment:4 in reply to: ↑ description Changed 5 years ago by watanabe

comment:5 Changed 4 years ago by scott.gonzalez

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from 1.next to 1.9

Fixed in  e66cdfc.

comment:6 Changed 4 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.6
Note: See TracTickets for help on using tickets.