【问题标题】:Ionic Iframe continuesly reload while typingIonic Iframe 在打字时不断重新加载
【发布时间】:2018-07-07 02:42:03
【问题描述】:

我创建了一个带有 iframe 的页面。 iframe 将呈现的 url 有一些输入字段。当我输入内容时,它会重新加载所有页面,而我什么也做不了。

查看

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

控制器

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);
  }
}

【问题讨论】:

    标签: ionic-framework iframe ionic3 ionic-native


    【解决方案1】:

    看起来这可能与单击输入字段时生成的调整大小事件有关,在这种情况下会发生放大或屏幕键盘将表单向上推。看到这个:

    Ionic 2 Form goes up when keyboard shows

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-05
      • 2019-06-10
      • 2010-12-24
      • 2023-03-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多