|
@@ -408,14 +408,14 @@
|
|
$(function () {
|
|
$(function () {
|
|
var noIos = isAndroidFun()
|
|
var noIos = isAndroidFun()
|
|
//微信内置浏览器浏览H5页面弹出的键盘遮盖文本框的解决办法
|
|
//微信内置浏览器浏览H5页面弹出的键盘遮盖文本框的解决办法
|
|
- window.addEventListener("resize", function () {
|
|
|
|
- if (document.activeElement.tagName == "INPUT" || document.activeElement.tagName == "TEXTAREA") {
|
|
|
|
- window.setTimeout(function () {
|
|
|
|
- document.activeElement.scrollIntoViewIfNeeded();
|
|
|
|
- }, 0);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
if(noIos){
|
|
if(noIos){
|
|
|
|
+ window.addEventListener("resize", function () {
|
|
|
|
+ if (document.activeElement.tagName == "INPUT" || document.activeElement.tagName == "TEXTAREA") {
|
|
|
|
+ window.setTimeout(function () {
|
|
|
|
+ document.activeElement.scrollIntoViewIfNeeded();
|
|
|
|
+ }, 0);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
var clientHeight = $(window).height();
|
|
var clientHeight = $(window).height();
|
|
$(window).on('resize',function () {
|
|
$(window).on('resize',function () {
|
|
var height = $(this).height();
|
|
var height = $(this).height();
|
|
@@ -425,6 +425,10 @@
|
|
$('#resetRibaoDigiBtn').addClass('resetRibaoDigiBtn');
|
|
$('#resetRibaoDigiBtn').addClass('resetRibaoDigiBtn');
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ }else {
|
|
|
|
+ ;(/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {
|
|
|
|
+ ['input', 'textarea'].includes(e.target.localName) && document.body.scrollIntoView(false)
|
|
|
|
+ }, true)
|
|
}
|
|
}
|
|
function isAndroidFun() {
|
|
function isAndroidFun() {
|
|
var u = navigator.userAgent;
|
|
var u = navigator.userAgent;
|