-
I am encountering a problem, that even when Markdown widget is focusable, I am unable to focus it by just calling focus() method manually. I have prepared a working example with two widgets. A ListView and a Markdown, with a keyboard shortcuts to focus one or another. https://github.com/ethael/textual-sandbox/blob/main/poc.py Is this a bug? Or am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think this might be down to the documentation for |
Beta Was this translation helpful? Give feedback.
I think this might be down to the documentation for
Markdown
being misleading. It says that it is a focusable widget by default, but it isn't. You could make it so by setting itscan_focus
property toTrue
, but really you probably want it in something like aVerticalScroll
so it'll be scrollable if there is more content than can be displayed (and this in turn will allow focus).