Ionic ion-modal height with keyboard bug

一个人想着一个人 提交于 2020-06-17 07:19:07

问题


I have a ion modal which i want to show of 60% of my screen, but when keyboard appears the modal resizes to 60% of the screen (including keyboard) so it shrinks a lot. I want the modal to stay the same size (ideally the size of its contents). Pictures explain a lot.

This is the css

.ion-modal.modal {
  width: 90%;
  min-height: 0 !important;
  height: 60% !important;
  top: 5%;
  left: 5%;
  right: 5%;
  bottom: 5%;
  background-color: #fff;
  -webkit-box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); }

And this the html

<ion-modal-view id="details_modal" class="ion-modal">
STUFF
</ion-modal-view>


回答1:


I fixed this issue using <ion-content overflow-scroll="false"></ion-content>

overflow-scroll="false"

fix the issue for me.



来源:https://stackoverflow.com/questions/39755851/ionic-ion-modal-height-with-keyboard-bug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!