Repository navigation
Conversation
This was referenced Nov 14, 2026
aiongg
force-pushed
the
next-focus-pointer
branch
from
November 14, 2026 01:44
76786f9 to
3693e76
Compare
`Ui::interact_opt` registers the widget as enabled only if both the `Ui` and `InteractOptions::enabled` are. A widget can then draw its own disabled look without a disabled child `Ui`, which would fade its painter, add a node to the accessibility tree and shift the auto-ids of the widgets after it.
Requests focus together with the event filter the widget keeps while focused. `set_focus_lock_filter` only applies once the widget had focus for a pass, so a widget that moves focus to a sibling on an arrow key (a radio group) lost it to egui's directional focus when a second arrow key came in the pass right after the request.
Enter and Space both act as a click on a focused widget. With `activate_on_space: false`, only Enter does, as for a link: Space doesn't activate a link, it scrolls the page in a browser. Defaults to true, which keeps the current behaviour.
aiongg
force-pushed
the
next-focus-pointer
branch
from
November 14, 2026 02:00
3693e76 to
5058c9f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
InteractOptions::enabled: disables one widget of an enabledUi.Memory::request_focus_with_filter: requests focus with an event filter applied from the next pass.InteractOptions::activate_on_space.DragAndDrop::aborted_by_escape: true in the pass where Escape cleared the payload.Behaviour changes
A pointer press goes to the widget under the press position (
PointerEvent::Pressed::position), not the one under the pass's last pointer position. When a press and moves arrive in one pass (a quick drag, a slow frame),is_pointer_button_down_on,drag_startedandclickedname the widget under the press. Hover stays at the last position.Tests
test_interact_opt_disabled_widget_in_enabled_uitest_interact_opt_activate_on_spacetest_press_goes_to_widget_under_pressescape_abort_is_reported_for_one_passrequest_focus_with_filter_applies_the_filter_from_the_next_passPATCHES.md: E26, E27 (the first three items have no row).
These commits are on
next, which craft-libsnextpins.