mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Scroll to center when tab is clicked.
Related comment: https://github.com/Textualize/textual/issues/2256#issuecomment-1505551728
This commit is contained in:
@@ -33,7 +33,7 @@ class MyApp(App[None]):
|
||||
yield Label(("SPAM\n" * 59)[:-1])
|
||||
|
||||
def key_s(self) -> None:
|
||||
self.query_one("#bullseye").scroll_to_center()
|
||||
self.screen.scroll_to_center(self.query_one("#bullseye"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user