ui5-webcomponents
ui5-webcomponents copied to clipboard
[Feature Request]: TextArea - Provide selectionStart and SelectionEnd
Feature Request Description
For some cases it would be great to have the selectionStart and selectionEnd attributes from the native html textarea component.
Proposed Solution
Provide the access to the native attributes selectionStart and selectionEnd.
Proposed Alternatives
No response
Organization
No response
Additional Context
No response
Priority
None
Privacy Policy
- [X] I’m not disclosing any internal or sensitive information.
Hi colleagues, can you, please, review this enhancement request regarding ui5-textarea? Thank you! Best regards, Petya Markova. (UI5 Dispatcher)
Hi,
I had the same requirement for plain input fields: see #4620
The proposed workaround was along these lines:
e.currentTarget.shadowRoot.querySelector("input").selectionStart
ok. Then lets hope that they will implement it in future.
@pop1989bb ,
Is the requirement regarding the TextArea or the Input field? I am asking as we have the selection event exposed in the TextArea and we can provide a util code, which will provide the coordinates of the selection start / end.
If you need it in the input component, we are still to introduce it there.
@hristop For the textArea. This would be great! For the Input component it could be interesting for @texttechne
Kind regards
@hristop,
yeah I would love to have the very same API for the input field as well. Also would stress the point of consistency.
I tried to make my point for the input field in #4620. selectionStart
and selectionEnd
are needed to realize stuff like an Input Mask component, for example...
Hi @pop1989bb ,
Sorry for the delay here. Here is the mentioned util for the text area: https://stackblitz.com/edit/js-r5m2rz?file=package.json,util.js,index.js
Best Regards, Hristo
Relates to: #8336 #7830
@hristop Thank you for the example!
Hi @pop1989bb ,
I would consider this issue done. If you don't think so, please post a comment with description to why this is not the case and we will reopen it.
Best Regards, Hristo