mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 17:05:34 +00:00
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
40 lines
No EOL
1,010 B
Markdown
40 lines
No EOL
1,010 B
Markdown
---
|
|
title: restorePosition
|
|
---
|
|
|
|
## Summary
|
|
|
|
Move OSK back to default position, floating under active input element, for
|
|
desktop OSK.
|
|
|
|
## Syntax
|
|
|
|
```js
|
|
keyman.osk.restorePosition(keepDefaultPosition);
|
|
```
|
|
|
|
## Parameters
|
|
|
|
`keepDefaultPosition`
|
|
: `boolean` <span class="optional">optional</span>
|
|
: If `true` does not reset the default `left`, `top` set by [`setRect()`](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()`](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 |