kranti
kranti

Reputation: 15

WindowsPhone KeyBoard: Prevent page screen scrolling up when soft keyboard is opened

​Generally: On Windows Phone when a TextBox is focused, the soft-keyboard will be opened.

Problem: By default the page screen to shifts upwards when keyboard opened and agains shift previous position when user closed the keyboard by tap on screen.

This problem occurs on windows phone and iphone environment, only android it is perfect.

Requirement: Page UI has header, body and footer. In page UI there is a TextBox just above the footer. When user focuses on this TextBox the page header is going to be invisible. But user doesn't want the page header shifts upwards when the keyboard is opened.

Upvotes: 0

Views: 641

Answers (1)

Giri
Giri

Reputation: 565

Use this plugin.

https://github.com/driftyco/ionic-plugin-keyboard

On device ready,

cordova.plugins.Keyboard.disableScroll(true);

If you have container going half invisible on iOS, use my answer from here.Phonegap - iOS Keyboard and Dropdown 'compress' webview because of vh unit

Upvotes: 1

Related Questions