Reputation: 167
<ion-view view-title="title">
<ion-content scroll="true">
<iframe src="{{link}}"></iframe>
</ion-content>
</ion-view>
look at the code above.
as the title says,when I use a iframe in the ion-content the scroll does't work.
How to solve this problem.
Upvotes: 7
Views: 41097
Reputation: 2291
Add the following css to the parent div of iframe
-webkit-overflow-scrolling: touch !important;
overflow: scroll !important;
Exmaple:
HTML
<ion-content class="iframe-fix">
<iframe [src]="pageUrl" frameborder="0"></iframe>
</ion-content>
SCSS
.platform-ios{
.iframe-fix{
-webkit-overflow-scrolling: touch !important;
overflow: scroll !important;
}
}
Upvotes: 1
Reputation: 433
Use overflow-scroll to enable scrolling
<ion-view view-title="title">
<ion-content overflow-scroll="true">
<iframe src="{{link}}"></iframe>
</ion-content>
</ion-view>
Upvotes: 16
Reputation: 167
It's a bug on ios. I have resolved this problem. Refer to the following
Upvotes: 3
Reputation: 276
<ion-view title="sample page">
<ion-content>
<iframe src="http://www.w3schools.com">
<p>Your browser does not support iframes.</p>
</iframe>
</ion-content>
<ion-view>
it will work scroll option is default true.no need to add specifically
Upvotes: -7