Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Handle virtual keyboard on Windows 8 tablet

In my webpage I have a text input field which gets covered by the keyboard in Windows 8.1 tablet.

I want the tablet to 'push up' the web page content (as it works on the iPad).

So: Is it possible to make the keyboard NOT covering my input field? And can I detect if a virtual keyboard is active with javascript?

like image 920
Mystogan Avatar asked Apr 17 '15 13:04

Mystogan


People also ask

How do I get the On-Screen Keyboard on my tablet?

From Settings, search for and select Language and input. Tap On-screen keyboard, and then tap Samsung Keyboard.

How do I bring up the virtual keyboard?

Open the keyboardAt the bottom right, select the time. Accessibility. Under "Keyboard and text input," turn on On-screen keyboard.


1 Answers

You could get the relative position of the text field in comparison to the screen resolution and if the field lays on the 2nd vertical half (i.e. the space that covers the keyboard after appearing), scroll down the webpage for a fixed amount of pixels.

If you use jQuery, you could use the jquery.scrollTo plugin to scroll to the field with a vertical negative offset, so the field is always visible.

Plugin site: https://github.com/flesler/jquery.scrollTo

Hope this helps!

I have no Windows tablet to be sure of how the OS manages the keyboard pop-up, but this method has worked for me on Android and iOS.

like image 53
pabloapa Avatar answered Oct 04 '22 02:10

pabloapa