// 解決鍵盤彈出后擋表單的問題
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);