Iframe-resizer: iFrameResizer not working in iOS.

Created on 14 Mar 2016  路  5Comments  路  Source: davidjbradshaw/iframe-resizer

I tried to view my company's site at http://www.itup.pt but what I get is the following:

ios_safari

The server hosting this already has the most recent version (3.5.1) installed. Here is the javascript we have:

`

        iFrameResize({
            log                     : true,                  // Enable console logging
            enablePublicMethods     : true,                  // Enable methods within iframe hosted page
            resizedCallback         : function(messageData){ // Callback fn when resize is received

            },
            messageCallback         : function(messageData){ // Callback fn when message is received

            },
            closedCallback         : function(id){ // Callback fn when iFrame is closed

            },
            heightCalculationMethod : 'max'
        });


    `

The site displays fine in mobile size in Chrome Windows. If I missed any options I should be using/trying, I would appreciate anyone pointing that out. Any other clues appreciated.

Thanks

Pedro Remedios

Most helpful comment

Thank you so much for the help.
It really worked for me.

All 5 comments

I have the same problem. Did you find any solutions?

I found out what was wrong. Apparently I had to tell iFrameResizer who big the screen was as it seems it's not doing very well. These are the options that I used for that:

maxWidth: screen.width,
minWidth: screen.width,
sizeWidth: 'true'

Hope this helps.

@premedios
Thanks, Your solution is working for me.

`
var screenWidth = screen.width;

if (browser.iPad) { screenWidth = screenWidth - 300;}

if (browser.iPhone) { screenWidth = screenWidth - 50;  }

S = {
------
maxHeight: 1 / 0,
maxWidth: screenWidth,
minHeight: 0,
minWidth: 0,
resizeFrom: "parent",
scrolling: !1,
sizeHeight: !0,
sizeWidth: true,
------------------
};`

Thank you so much for the help.
It really worked for me.

@premedios

I was having the same issue. Followed your solution and everything seems to work fine. Thanks to you.

Either documentation needs to be updated or the library to handle this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wei2go picture wei2go  路  3Comments

anlambert picture anlambert  路  6Comments

TarsisDragomir picture TarsisDragomir  路  5Comments

mouse0270 picture mouse0270  路  6Comments

amangeot picture amangeot  路  8Comments