Ionic

mddialog hiding keyboard on iOS

By October 18, 2017 No Comments
1
2
3
4
5
6
7
8
9
10
if(ionic.Platform.isIOS()){
    window.addEventListener('native.keyboardhide', keyboardHideHandler);
    window.addEventListener('native.keyboardshow', keyboardShowHandler);
    function keyboardHideHandler(e){
        $('.md-dialog-container').css('paddingBottom', 0);
    }
    function keyboardShowHandler(e) {
        $('.md-dialog-container').css('paddingBottom', e.keyboardHeight);
    }
}