Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose cursor position index on click of TextField #645

Open
hi-brylle opened this issue Feb 6, 2024 · 0 comments
Open

Expose cursor position index on click of TextField #645

hi-brylle opened this issue Feb 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hi-brylle
Copy link

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.

@hi-brylle hi-brylle added the enhancement New feature or request label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant