// 解決鍵盤(pán)彈出后擋表單的問(wèn)題
window.addEventListener('resize', function() {
if(
document.activeElement.tagName === 'INPUT' ||
document.activeElement.tagName === 'TEXTAREA'
) {
window.setTimeout(function() {
if('scrollIntoView' in document.activeElement) {
document.activeElement.scrollIntoView();
} else {
document.activeElement.scrollIntoViewIfNeeded();
}
}, 0);
}
});
如果還不行就要修改webview高度, Keyboard.addListener('keyboardDidShow', keyboardDidShow);