如何使内容在ios中降至最低

时间:2019-02-17 14:44:34

标签: ionic-framework

我正在尝试做出类似的操作,如果有人在文本区域中单击,我的scrool会跳到底部,我做出这样的操作:

addKeyboardListeners() {
this.keybaordShowSub = this.keyboard.onKeyboardShow().subscribe(e => {
  this.updateScroll("keybaord show", this.scrollTimeout);
  let newHeight =
    e["keyboardHeight"] + this.textareaHeight - this.initialTextAreaHeight;
  let marginBottom = newHeight + 44 + "px";
  this.renderer.setElementStyle(
    this.scrollContentElement,
    "marginBottom",
    marginBottom
  );
  this.renderer.setElementStyle(
    this.footerElement,
    "marginBottom",
    e["keyboardHeight"] + "px"
  );
  /*this.updateScroll("keybaord show", this.scrollTimeout);*/
  // console.log("keybaordShowSub");
  this.updateScroll("keybaord show", 300);
  this.updateScroll("keybaord show", 500);
});

}

但是有时在IOS中,如果内容很多,如果我单击文本区域,则所有html文本都变得不可见,只有css适用,有人可以帮忙吗?

0 个答案:

没有答案