简体   繁体   English

ipad 虚拟键盘后面的模态得到重叠

[英]Modal get overlap behind the ipad virtual keypad

I am using a custom ui-dialog modal.我正在使用自定义ui-dialog模式。 This is working fine on desktop and android device.这在桌面和 android 设备上运行良好。 But ON IOS device it's occurring issue once virtual keypad open.但是在 IOS 设备上,一旦虚拟键盘打开,就会出现问题。 Usually, it's pushed the content top once keyboard shows.通常,一旦键盘显示,它就会将内容推到顶部。 I have used position: absolute;我用过position: absolute; and also tried with relative but still, it does not work.并且还尝试了relative但仍然不起作用。 Can anybody help me with this..任何人都可以帮我解决这个问题..

在此处输入图像描述

Try尝试

<script>
if( navigator.userAgent.match(/iPhone|iPad|iPod/i) ) {
   var s = document.createElement('style'), styleSheet;
   document.head.appendChild(s);
   styleSheet = s.sheet;
   styleSheet.insertRule(".modal { position:absolute; bottom:auto; }", 0);
 }
</script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM