mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
fix focus glitch
This commit is contained in:
@@ -25,13 +25,13 @@ You can install Textual via PyPI.
|
||||
If you plan on developing Textual apps, then you should install `textual[dev]`. The `[dev]` part installs a few extra dependencies for development.
|
||||
|
||||
```
|
||||
pip install "textual[dev]==0.2.0b6"
|
||||
pip install "textual[dev]==0.2.0b7"
|
||||
```
|
||||
|
||||
If you only plan on _running_ Textual apps, then you can drop the `[dev]` part:
|
||||
|
||||
```
|
||||
pip install textual==0.2.0b6
|
||||
pip install textual==0.2.0b7
|
||||
```
|
||||
|
||||
!!! important
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "textual"
|
||||
version = "0.2.0b6"
|
||||
version = "0.2.0b7"
|
||||
homepage = "https://github.com/Textualize/textual"
|
||||
description = "Modern Text User Interface framework"
|
||||
authors = ["Will McGugan <will@textualize.io>"]
|
||||
|
||||
@@ -1850,7 +1850,10 @@ class Widget(DOMNode):
|
||||
|
||||
def set_focus(widget: Widget):
|
||||
"""Callback to set the focus."""
|
||||
widget.screen.set_focus(self, scroll_visible=scroll_visible)
|
||||
try:
|
||||
widget.screen.set_focus(self, scroll_visible=scroll_visible)
|
||||
except NoScreen:
|
||||
pass
|
||||
|
||||
self.app.call_later(set_focus, self)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user