Prevent keyboard pushing view in Ionic and MKWebVIew in iOS

Hi all, I’m using Ionic 3 and MKWebView. I want to achieve a search screen that overlay current screen, auto focus on the input, and show the keyboard.
However every time the keyboard shows up, it push the view upward. This is the video of it: youtube

Those are my code:

<ion-content padding fullscreen overflow-scroll=”true” [ngClass]="{'blur': showSearchScreen}" #body>

<div *ngIf="showSearchScreen" class="overlay">
    <div class="search-box-wrapper">
        <ion-input type="text" [(ngModel)]="searchText" class="search-box" placeholder="Type search term" #searchInput [focus]="searchInput">


    @ViewChild('searchInput') searchInput ;

And the auto focus directive:

    selector: '[focus]' // Attribute selector

export class FocusDirective {

    @Input() focus: any;




    <preference name="KeyboardDisplayRequiresUserAction" value="false" />

I tried some solutions but none worked for me. Any suggestion is highly appreciated. Thank in advance.

Any updates on this issue? I have the exact same problem

What is “MKWebView”?

I think he means WKWebView

It may be related to

However I cannot solve by any of the proposed solutions