spiegel-keyman/web/docs/engine/reference/osk/restorePosition.md
Marc Durdin 6c145cb775 refactor(web): move web engine help to app repo
Note: build.sh updated to make sure that test:help build action:target
doesn't also call test.sh by adding `:_all` meta-target.

Note: CI will need a new help-keyman-com.sh build step to deploy web
engine help.

Fixes: #12347
2024-10-31 11:00:06 +07:00

1,010 B

title
restorePosition

Summary

Move OSK back to default position, floating under active input element, for desktop OSK.

Syntax

keyman.osk.restorePosition(keepDefaultPosition);

Parameters

keepDefaultPosition
boolean optional
If true does not reset the default left, top set by setRect().
If false or omitted, resets the default left, top as well.

Return Value

undefined

Description

This is the equivalent of pressing the pin in the title bar of the desktop OSK. The user may move the OSK, after which point the OSK stays where the user has placed it. Similarly, calling setPos() will fix the position of the OSK. Calling restorePosition() resets the position of the OSK and re-attaches it to the bottom of the active input element.

Note that if the user clicks the pin it does not reset the default left, top as set by setRect().

History

  • Published as public API in 14.0.272