DioxusLabs / DioxusLabs/dioxus
Feature Request: Implement Selection API / selections for text-editable elements
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
### Description
Currently, the Dioxus Web framework does not provide a direct, idiomatic, and type-safe way to access the `selectionStart` and `selectionEnd` properties for text input elements such as `` and `<input>`. These properties are crucial for handling text selection within these elements, which is a common requirement in web applications (e.g., for implementing custom text editors, autocomplete, or other interactive text manipulation features).
The `selectionStart` and `selectionEnd` properties are well-documented in the [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/selectionStart) and are supported in all modern browsers. However, in Dioxus, developers currently need to manually write JavaScript evaluation code to access these properties, which is error-prone and not type-safe.
If this is already possible and this is a redundant issue please point me in the right direction, but my (quick) search on the DioxusLabs site docs and the discord help forum didn't really give me any results
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.