Background image resized when open keyboard


#1

SOLUTION

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" />
</edit-config>

After
cordova platform rm android && cordova platform add android

PROBLEM
resized background image when keyboard open
how fix it

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

CSS
.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;
}

system
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


#2

You may forgot to add the tag FIXED.

background-attachment: fixed;

It shouldn’t resize anymore now.


#3

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