Background image resized when open keyboard


Add to config.xml

<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']">
        <activity android:name="MainActivity" android:windowSoftInputMode="adjustPan" />

cordova platform rm android && cordova platform add android

resized background image when keyboard open
how fix it

i added to “ion-content” that “background-cover” class

.background-cover {
background: url(’…/assets/images/bg.png’) no-repeat;
background-position: center;
background-size: cover;
height: 100%;

.background-cover a {
color: #fff;
text-decoration: none;

Ionic Framework: 3.9.2
Ionic App Scripts: 3.1.2
Angular Core: 5.0.3
Angular Compiler CLI: 5.0.3
Node: 8.4.0
OS Platform: Windows 10
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Mobile Safari/537.36

1 Like

You may forgot to add the tag FIXED.

background-attachment: fixed;

It shouldn’t resize anymore now.

thanks for reply but that doesn’t work :confused:

Did you find any solution?