File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def compose(self) -> textual.app.ComposeResult:
39
39
yield textual .widgets .Button ("Done" , variant = "primary" , id = "help-done" )
40
40
41
41
def on_mount (self ) -> None :
42
- self .query_one (textual .widgets .Markdown ).focus ()
42
+ self .query_one ("#help-text" , textual .widgets .MarkdownViewer ).focus ()
43
43
44
44
def on_button_pressed (self , _event : textual .widgets .Button .Pressed ) -> None :
45
45
self .app .pop_screen ()
Original file line number Diff line number Diff line change @@ -34,3 +34,13 @@ async def test_browse_empty_vim() -> None:
34
34
).run_test () as pilot :
35
35
await pilot .press ("j" , "l" , "j" , "enter" )
36
36
assert pilot .app .query_one ("#main-view" ).current == "empty"
37
+
38
+
39
+ async def test_help_focus () -> None :
40
+ async with Browser (
41
+ Path (skhep_testdata .data_path ("uproot-empty.root" ))
42
+ ).run_test () as pilot :
43
+ await pilot .press ("?" )
44
+ focus_chain = [widget .id for widget in pilot .app .screen .focus_chain ]
45
+ assert focus_chain == ["help-text" , None , "help-done" ]
46
+ assert pilot .app .screen .focused .id == "help-text"
You can’t perform that action at this time.
0 commit comments