1

I created a page with an iframe. The url that the iframe will render has some input fields. When I type something, it reload all the page and I can do nothing.

View

<ion-content no-padding>
 <iframe [src]="urlpaste()"></iframe>
</ion-content>

Controller

import { Component } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

  my_url: any;
  constructor(private sanitize: DomSanitizer) {}

  urlpaste(){
    this.my_url = "http://example.com/";
    return this.sanitize.bypassSecurityTrustResourceUrl(this.my_url);
  }
}
Harsha Basnayake
  • 4,565
  • 3
  • 17
  • 23

1 Answers1

0

It looks like this may have to do with the resize event(s) generated from clicking into the input field, in which case a zoom in happens or the on-screen keyboard pushes the form up. See this:

Ionic 2 Form goes up when keyboard shows

ltree
  • 43
  • 1
  • 1
  • 8