SelectionStart and SelectionEnd: Doesn't seem to work for Input / Not available for Textarea


There seems to be an issue with selectionStart (and/or -End). Supplying them as a callback Input or State only ever gives me the initial value (provided I had set one explicitly in the layout). I’ve been trying numerous variations of code that are all basically like adamschroeder’s here (topic 39023). Am I (are we) missing something?

Also, I ultimately will need to use this functionality in a Textarea also, but I only see this property associated with Input. That seems like an odd asymmetry. It’s arguably even more useful in a Textarea where people might be expected to do more complex editing etc - you know, as I am literally doing as I type this. :wink: In fact, my goal is to put some Markdown buttons on my Inputs and Textareas not unlike what is on this very widget.

Thanks a bunch!

1 Like