您的位置:首页 > 其它

ionic3 footer上添加输入框,弹出键盘时,整个页面全部上移问题

2018-01-24 16:55 387 查看
Solution with changing ion-input to input doesn't work for me (ionic beta 11). My workaround, in app.ts, constructor, platform is ready:

if (platform.is('ios')) {
let
appEl = <HTMLElement>(document.getElementsByTagName('ION-APP')[0]),
appElHeight = appEl.clientHeight;

Keyboard.disableScroll(true);

window.addEventListener('native.keyboardshow', (e) => {
appEl.style.height = (appElHeight - (<any>e).keyboardHeight) + 'px';
});

window.addEventListener('native.keyboardhide', () => {
appEl.style.height = '100%';
});
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐