Skip to content

Expose cursor position index on click of TextField #645

Open
@hi-brylle

Description

@hi-brylle

Is there a way to determine the cursor position index upon click of TextField with a non-empty string in it? I can't find it in the documentation. Also tried hunting it in the source code but I just can't find it, if it ever exists.

Thanks.

P.S. I use this library in an embedded GUI app with a touch panel in tandem with https://github.com/russellsamora/svelte-keyboard. Every keypress in that library effectively returns a char in a callback; I am free to put this char anywhere in some string. Usually, the chars are appended to the end of that, but there's complications if the user of the app clicks the TextField somewhere in between the string, hence I need the cursor position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions