Opened 7 years ago

Closed 5 years ago

#5166 closed bug (cantfix)

Dialog: iFrame being loaded 3 times in Firefox

Reported by: bitwalker Owned by:
Priority: major Milestone: 1.10.0
Component: ui.dialog Version: 1.7.2
Keywords: firefox iframe Cc:
Blocked by: Blocking:

Description

When using an iFrame in the div of a dialog, the iFrame is being requested 3 times (instead of once), when the dialog is being displayed. Reproducible in Firefox 3.5 and 3.6. Doesn't happen with Safari.

These multiple requests can have a major impact depending on the page which is being called.

To test, disable all browser caching (use about:config, search for cache) and monitor your web-server logs.

Since the documentation/demos don't include any iFrame examples I wonder if this is officially being supported at all.

Attachments (2)

modaliframe.html (2.3 KB) - added by bitwalker 7 years ago.
demo dialog page with iframe
iframe.html (325 bytes) - added by bitwalker 7 years ago.
iframe page for demo

Download all attachments as: .zip

Change History (16)

Changed 7 years ago by bitwalker

Attachment: modaliframe.html added

demo dialog page with iframe

Changed 7 years ago by bitwalker

Attachment: iframe.html added

iframe page for demo

comment:1 Changed 7 years ago by bitwalker

Issue also confirmed in 1.8rc1.

comment:2 Changed 7 years ago by Jörn Zaefferer

Component: ui.coreui.dialog

comment:3 Changed 7 years ago by Scott González

Milestone: TBD1.8

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

I think,

  • #4534 solves a similar problem, but does not solve this problem.
  • This problem is like #5575.
  • It's a problem, but it's not a bug of the dialog.

There is no workaround in this component.

I think you counted,

  • when dialog _create
    1. Appending uiDialogContent to uiDialog.
    2. Appending uiDialog to document body.
  • when dialog destroy
    1. Appending uiDialogContent to document body.

I think it may be a workaround (outside this component):

  1. In the html source, set the src of the iframe to 'about:blank' or 'javascript:false'.
  2. Create dialog with {autoOpen:false}.
  3. Set the src of iframe.
  4. Open the dialog.
  5. Before desroying, Set the src to blank.
  • 'about:blank' may have a problem with 'https:'.
  • I have heard someone says 'javascript:' is slower than 'about:blank'.

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

I made a mistake.

I should have written like this:

  1. Appending uiDialogContent to uiDialog when dialog _create.
  2. Appending uiDialog to document body when dialog open.
  3. Appending uiDialogContent to document body when dialog destroy.

When {autoOpen:true}, 'dialog open' is called from 'dialog _create'.

comment:6 Changed 5 years ago by Scott González

Related to #8244.

comment:7 Changed 5 years ago by Zwonimir

I still have the same problem, but in my situation the iframe reload 2 times when I open it and 2 times when I close it. With this solution:

    In the html source, set the src of the iframe to 'about:blank' or 'javascript:false'.
    Create dialog with {autoOpen:false}.
    Set the src of iframe.
    Open the dialog.
    Before desroying, Set the src to blank. 

... I get rid of the 2 reloads during the close event, but still the iframe reload two times when I open the dialog, and only if I use an effect on the option "show".

comment:8 Changed 5 years ago by Scott González

Milestone: 1.9.01.10.0

comment:9 Changed 5 years ago by dcarrith

Summary: iFrame in dialog is being loaded 3 times in Firefox 3.xDialog: iFrame being loaded 3 times in Firefox 3.x

comment:10 Changed 5 years ago by drewkimrey

#8244 is a duplicate of this ticket.

comment:11 Changed 5 years ago by petersendidit

Status: newopen

comment:12 Changed 5 years ago by Jörn Zaefferer

Reproducible in latest Firefox. I tend to close this as wontfix/cantfix and extend the documentation to say that iframes inside dialogs cause trouble.

comment:13 Changed 5 years ago by mikesherov

Summary: Dialog: iFrame being loaded 3 times in Firefox 3.xDialog: iFrame being loaded 3 times in Firefox

comment:14 Changed 5 years ago by Scott González

Resolution: cantfix
Status: openclosed

There's nothing we can do about this. You can track the Firefox bug at https://bugzilla.mozilla.org/show_bug.cgi?id=254144

I'll ping Mozilla about this to see if we can get some traction on the bug, but seeing as how it's been open for 8 years I wouldn't expect too much.

Note: See TracTickets for help on using tickets.