在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ iphonex微信頁面下,safari不會,input輸入框拉起鍵盤后,鍵盤消失

iphonex微信頁面下,safari不會,input輸入框拉起鍵盤后,鍵盤消失,但是原本鍵盤的區(qū)域還存在

iphone x微信頁面下,safari不會,且測試了其他iphone手機(jī)都沒有類似問題,input輸入框拉起鍵盤后,鍵盤消失,但是原本鍵盤的區(qū)域還存在,并且頁面底部會出現(xiàn)相同區(qū)域大小的空白。這個時候刷新頁面 都不會恢復(fù)正常,alert($(window).height())高度也只有上面區(qū)域高度。
頁面代碼:

clipboard.png

頁面效果:

clipboard.png

回答
編輯回答
任她鬧
const windowHeightSize = String(document.documentElement.clientHeight || document.body.clientHeight );
if (!(localStorage.getItem('windowHeight'))) {
  localStorage.setItem('windowHeight' , windowHeightSize);
}
const historyWindowHeight = Number(localStorage.getItem('windowHeight'));
console.log('緩存 列表最小高度' + historyWindowHeight);
$('body').css('min-height', historyWindowHeight);

// 搜索框失去焦點(diǎn)
$('form input').on('blur', this, (ev) => {
  alert(this.historyWindowHeight);
  setTimeout(function() {
   $('body').css('min-height', historyWindowHeight);
  }, 10);
  this.cleanInterval(); // 清除搜索提示
});


頁面進(jìn)入的時候 獲取 body最小高度為窗口瀏覽器高度。存在緩存。
2017年8月4日 05:33