You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have decided to polish/refine everything related to focus within my project. Keyboard-driven focus (tab / Shift+tab) works fine but mouse-driven focus does not seem to match my expectations (my reference being full-fledged GUI applications: Windows/MacOS/X11/GTK/Qt).
Note: this issue was first discussed on Discord on 2024-02-28.
Expectations
In GUI applications, a common thing is: when you click text (be it selectable or not) or a seemingly "empty" area, your click gives focus to the focusable widget this text/area belongs to (either directly or indirectly).
Context
I have decided to polish/refine everything related to focus within my project. Keyboard-driven focus (tab / Shift+tab) works fine but mouse-driven focus does not seem to match my expectations (my reference being full-fledged GUI applications: Windows/MacOS/X11/GTK/Qt).
Note: this issue was first discussed on Discord on 2024-02-28.
Expectations
In GUI applications, a common thing is: when you click text (be it selectable or not) or a seemingly "empty" area, your click gives focus to the focusable widget this text/area belongs to (either directly or indirectly).
Another way to put it (© @davep ): clicking on a non-focusable widget should focus the nearest (in terms of distance up the DOM) focusable ancestor.
Initial discussions on Discord tend to show these expectations make sense.
Current behaviour
These MREs reflect that, out of the box, the expected behaviour does not happen in a Textual application.
MRE #1
MRE #2 (same as #1 with an extra Collapsible widget)
Initial discussions on Discord tend to confirm there is some discrepancy between current and expected behaviour.
Textual Diagnostics
Versions
Python
Operating System
Terminal
Rich Console options
The text was updated successfully, but these errors were encountered: