IFRAME content disappears when panel closes (1.4-alpha) #6260

Closed
iwsk416 opened this Issue Jul 31, 2013 · 7 comments

Comments

Projects
None yet
4 participants
@iwsk416

iwsk416 commented Jul 31, 2013

Issue description:
IFRAME content (inserted by JavaScript) disappears when panel closes.
This problem occurs with 1.4-alpha only.

Test page:
http://jsbin.com/ofuhaw/103

Steps to reproduce:

  • (1) Click "Open Panel" button, then a panel opens.
  • (2) Click "Close Panel" button on the panel, then the panel closes and IFRAME content disappears.

Expected outcome:

  • IFRAME content should not change.

Actual outcome:

  • IFRAME content disappears.

Platforms/browsers and devices tested:

  • Windows 7 and 8 / Google Chrome 28

jQuery Mobile and jQuery core version used:

  • jQuery Mobile 1.4.0-alpha 1 & 1.4.0-pre
  • jQuery 1.10.1
  • This test page works well on 1.3.2

When I deleted a following line on trial, the problem was solved.
So, I guess that _wrapper() is related to the problem.

(Line 12367@1.4.0-alpha1) :

self._wrapper().removeClass( self._pageContentOpenClasses );
@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Aug 9, 2013

Member

@iwsk416

I made a change so we don't call _wrapper() in case of an overlay panel. We don't need to wrap page contents for this display mode because only the panel animates. That will resolve the issue on your test page. However, can't be fixed for the reveal and push display modes. In that case we need to use .wrapAll() and this seems to trigger a refresh of iFrames on some browsers. I read something about this on StackOverflow and the jQuery core bug tracker and it doesn't seem to be a jQuery bug but wrong behaviour of those browsers.

I am closing this ticket as fixed (I will merge the change in master later today) for overlay panels, and won't fix for reveal and push panels.

Member

jaspermdegroot commented Aug 9, 2013

@iwsk416

I made a change so we don't call _wrapper() in case of an overlay panel. We don't need to wrap page contents for this display mode because only the panel animates. That will resolve the issue on your test page. However, can't be fixed for the reveal and push display modes. In that case we need to use .wrapAll() and this seems to trigger a refresh of iFrames on some browsers. I read something about this on StackOverflow and the jQuery core bug tracker and it doesn't seem to be a jQuery bug but wrong behaviour of those browsers.

I am closing this ticket as fixed (I will merge the change in master later today) for overlay panels, and won't fix for reveal and push panels.

@iwsk416

This comment has been minimized.

Show comment
Hide comment
@iwsk416

iwsk416 Aug 9, 2013

@uGoMobi

Thank you.
It enables me to port my app to 1.4 :-)

iwsk416 commented Aug 9, 2013

@uGoMobi

Thank you.
It enables me to port my app to 1.4 :-)

@frequent

This comment has been minimized.

Show comment
Hide comment
@frequent

frequent Sep 27, 2013

Contributor

@uGoMobi:
as a more general point of discussion, is it really necessary to wrapAll, because this is not a minor DOM manip (and can cause a lot of havoc). If it was possible to set the classes on ui-content the page structure would be unchanged.

Contributor

frequent commented Sep 27, 2013

@uGoMobi:
as a more general point of discussion, is it really necessary to wrapAll, because this is not a minor DOM manip (and can cause a lot of havoc). If it was possible to set the classes on ui-content the page structure would be unchanged.

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Sep 27, 2013

Member

@frequent @uGoMobi and i actually investigated this and great depth and it is very necessary in this case every other solution had a major issue on some platform that was a deal breaker

Member

arschmitz commented Sep 27, 2013

@frequent @uGoMobi and i actually investigated this and great depth and it is very necessary in this case every other solution had a major issue on some platform that was a deal breaker

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Sep 28, 2013

Member

@frequent

I looked into it again and we can't transition ui-content. The reason is that we set a background to the element we transition and make it inherit the height from the page. That means that a footer (not fixed) will be pushed down. I think we should go for the option enhanced for panels so you can add the wrapper yourself or (if you don't use a footer) add the wrapper class the ui-content element.

Member

jaspermdegroot commented Sep 28, 2013

@frequent

I looked into it again and we can't transition ui-content. The reason is that we set a background to the element we transition and make it inherit the height from the page. That means that a footer (not fixed) will be pushed down. I think we should go for the option enhanced for panels so you can add the wrapper yourself or (if you don't use a footer) add the wrapper class the ui-content element.

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Jan 24, 2014

Member

Im going to re open this because this is our fault for detaching the element from the dom it reloads the iframe we should do this only on create for internal panels and for external we need to update when ever the page changes

Member

arschmitz commented Jan 24, 2014

Im going to re open this because this is our fault for detaching the element from the dom it reloads the iframe we should do this only on create for internal panels and for external we need to update when ever the page changes

@frequent

This comment has been minimized.

Show comment
Hide comment
@frequent

frequent Feb 28, 2014

Contributor

Merci bien!

Contributor

frequent commented Feb 28, 2014

Merci bien!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment