Encountered in the work, iOS system, after the input is completed, pop-up information, the keyboard does not bounce down, resulting in a bad user experience. My solution is to override the alert method
JS Code:
Window.alert=function () {
var shield = document.createelement ("DIV");
Shield.setattribute ("Class", "Alert_dialog");
var strhtml= "";
strhtml+= ' <div class= "Alert_dialog_con" > ";
strhtml+= ' <p> ' +str+ ' </p> ';
strhtml+= ' <button class= "alert_dialog_btn" onclick= "Dook ();" > Confirmation </button> ';
strhtml+= ' </div> ';
shield.innerhtml = strhtml;
Document.body.appendChild (shield);
This.dook = function () {
Shield.parentNode.removeChild (shield);
}
}
CSS code:
. alert_dialog {
Width:19rem;
position:fixed;
top:0;
left:0;
bottom:0;
right:0;
Background:rgba (0, 0, 0, 0.6);
z-index:1999;
Display:block;
Transition:. 6s all ease;
Overflow-y: auto;
}
. Alert_dialog_con {
width:72%;
Margin:10rem Auto 0;
Background: #ffffff;
Padding:1rem;
Text-align:center;
border-radius:5px;
}
. Alert_dialog_con p{
Margin-top:1rem;
line-height:24px;
Font-size:0.8rem;
}
. alert_dialog_btn {
Width:5rem;
Height:2rem;
Margin-top:2rem;
Font-family: "Microsoft Jas Black";
border-radius:5px;
Margin-bottom:1rem;
}
After iOS OS input is complete, the keyboard does not bounce down