Bug with keyboard shrink


#1

When using Keyboard shrink, the screen goes behind the statusbar:


#2

If this is a Cordova project, have you installed cordova-plugin-keyboard?


#3

yes i am using cordova plugin keyboard

it happens only when keyboard activated


#4

What version are you using in your app?


#5

cordova-plugin-keyboard npm * 1.2.0

using phonegap build, which picks automatic the latest version


#6

so no idea how to fix that?


#7

You need to call Keyboard.shrinkView(true); on deviceready


#8

thats what i do

but i still get that bug


#9

Please, try it in index.js

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {

    Keyboard.shrinkView(true);

}

#10

I dont have a index.js,

i have just one logic.js which is loaded at index.html

and this is the code it contians:

// Handle Cordova Device Ready Event
$$(document).on('deviceready', function() {
	deviceready = true;
	StatusBar.styleDefault();
	
	Keyboard.shrinkView(true);
	Keyboard.disableScrollingInShrinkView(true);
	Keyboard.hideFormAccessoryBar(true);

should i maybe call the Keyboard.shrinkView(true) much earlier? or what could caus this bug??


#11

so no idea on how to fix this??

It apears also that on android, my message bar stays behinde the keyboard.


#12

Manged to fix it:
this is my Solution:

in config.xml:

<preference name="DisallowOverscroll" value="true" />
<preference name="orientation" value="portrait" />
<preference name="Fullscreen" value="true" />
<preference name="HideKeyboardFromAccessoryBar" value="true" />
<plugin name="cordova-plugin-statusbar" />

in index.html:

	<div id="app" class="">
		<div class="statusbar"></div>

in index.js:

app = new Framework7({
	....
	statusbar: {
		enabled: true,
		overlay: true,
	},
	....

that worked for me