---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.3
alternate:
  - https://divkit.tech/docs/en/concepts/divs/2/div-action-set-cursor-position.md
  - https://divkit.tech/docs/ru/concepts/divs/2/div-action-set-cursor-position.md
---
> **Documentation Index:** Fetch the complete configuration index at https://divkit.tech/docs/en/llms.txt

# div-action-set-cursor-position
Sets the cursor position in the specified input field.

## Parameters
| Parameters | Description |
| --- | --- |
| `id` | <p>**string**</p><p>Required parameter.</p><p>ID of the input field.</p><p>Available platforms: Android, iOS, web.</p> |
| `position` | <p>**object**</p><p>Required parameter.</p><p>Defines the cursor position. If `end` is not set, or if `end` is equal to `start`, it will just be the cursor position, if both are set and the values are different, part of the text will be selected. Use 0 to indicate the beginning of the text, -1 for the end.</p><p>The value has the type `position`.</p><p>Available platforms: Android, iOS, web.</p> |
| `type` | <p>**string**</p><p>Required parameter.</p><p>The value must always be `set_cursor_position`.</p><p>Available platforms: Android, iOS, web.</p> |

### position
| Parameters | Description |
| --- | --- |
| `start` | <p>**int**</p><p>Required parameter.</p> |
| `type` | <p>**string**</p><p>Required parameter.</p><p>The value must always be `absolute`.</p> |
| `end` | <p>**int**</p> |

<details>
<summary>JSON</summary>

```json
{
  type*: "set_cursor_position",
  id*: "string",
  position*: {
    type*: "absolute",
    end: "int",
    start*: "int"
  }
}
```
</details>
