Virtual keyboard

The virtual keyboard closes when the device is turned over. It works differently for standard HTML. It can be repeated only locally, possibly because of the i-frame.
The code from the snippet was used


  • Hello @lBeJIuk,

    The virtual keyboard closes when the device is turned over.

    This is explained by the way Webix handles screen rotation. When changing the screen orientation, the components will adjust themselves by resizing accordingly. The resize() method forces the components to render anew, which makes the input (in your case) drop the focus (which then in turn makes the virtual keyboard disappear).

    While it is impossible to change this behaviour, working around it is possible. For instance, Webix has the onRotate event which triggers when the screen orientation is changed. We can use this event to catch the appropriate moment and focus the correct input manually (we will also need to move the cursor to the very end of the input after we focus it).

    Please take a look at the following example: source code can be looked up here - Please note that setting a certain delay is mandatory in this case.

    The above logic can be improved further. In theory, it is possible to keep track of the onFocusChange event and check the previously focused view, which you can reference in the onRotate event.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion