问题
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