Input not focused when selecting text
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
Repro:
1. Open Demos -> Widget Gallery on the [web demo](https://egui.rs)
2. Run `setInterval(() => console.log(document.activeElement), 1000)` in a devtools console
3. Type something into the first text field
4. Click somewhere outside of the text field to blur it
5. Select the text by dragging over it - make sure the text field is blurred!
Expected behavior: `runner.mutable_text_under_cursor` is set to `true`, causing the `` element to be the `document.activeElement`
Actual behavior: `runner.mutable_text_under_cursor` is `false`, and `document.activeElement == document.body`
Contributor guide
Research direction
Start with the Demos → Widget Gallery web demo and trace the code that updates runner.mutable_text_under_cursor during text selection. Use the provided document.activeElement check to reproduce the blurred-field case. Done means selecting text in the blurred field sets the flag to true and focuses the input element.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rust, wasm
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100