Iframe - height is ignored (iOS)


#1

When using iFrame inside ion-content in iOS the height attribute is ignored.

I tried setting through attribute, through styles, through styles with !important keyword. Nothing works. It always same height as it’s content


#2

ok, looks like it is normal behavior for iframes in iOS and Ionic did good job to fix it.
Now the issue is that I have a form inside iframe and whenever I click the input whole iframe scrolls to top. Anyone know how to avoid that? Thank you :slight_smile:


#3

Hi, I have the same issue. Have you find a solution?


#4

Yes.
I applied this CSS to the page inside iframe(luckily I had access to it):

html {

  height: 100%;

}

body {

  height: 100%;

  -webkit-overflow-scrolling: touch;

}

I don’t know any other workarounds.