-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Disabled widgets prevent focus from going to next widget #5359
Comments
1 task
lucasmerlin
added a commit
that referenced
this issue
Nov 14, 2024
lucasmerlin
added a commit
that referenced
this issue
Nov 14, 2024
emilk
pushed a commit
that referenced
this issue
Nov 26, 2024
- fixes #5359 For the test I added a `Harness::press_key` function. We should eventually add these to kittest, probably via a trait one can implement for the `Harness` but for now this should do.
lucasmerlin
added a commit
that referenced
this issue
Nov 28, 2024
* Closes #686 * Closes #839 * #5370 should be merged before this * [x] I have followed the instructions in the PR template This adds modals to egui. This PR - adds a new `Modal` struct - adds `Memory::set_modal_layer` to limit focus to a layer and above (used by the modal struct, but could also be used by custom modal implementations) - adds `Memory::allows_interaction` to check if a layer is behind a modal layer, deprecating `Layer::allows_interaction` Current problems: - ~When a button is focused before the modal opens, it stays focused and you also can't hit tab to focus the next widget. Seems like focus is "stuck" on that widget until you hit escape. This might be related to #5359 fixed! Possible future improvements: - The titlebar from `window` should be made into a separate widget and added to the modal - The state whether the modal is open should be stored in egui (optionally), similar to popup and menu. Ideally before this we would refactor popup state to unify popup and menu --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Disabled widgets currently make it impossible to focus all widgets by pressing tab.
In this video I keep hitting tab:
Bildschirmaufnahme.2024-11-08.um.11.37.34.mov
Notice how
Button 3
never receives focus.To Reproduce
Minimal example:
Expected behavior
It should be possible to focus the widget after the disabled widget
The text was updated successfully, but these errors were encountered: