mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Don't remove a widget from display before actual removal
This change ensures that, for example, the widget remains in the Screen.focus_chain so that it's easier to handle passing off focus on removal. To help address #939.
This commit is contained in:
@@ -1775,7 +1775,6 @@ class Widget(DOMNode):
|
|||||||
|
|
||||||
def remove(self) -> None:
|
def remove(self) -> None:
|
||||||
"""Remove the Widget from the DOM (effectively deleting it)"""
|
"""Remove the Widget from the DOM (effectively deleting it)"""
|
||||||
self.display = False
|
|
||||||
self.app.post_message_no_wait(events.Remove(self, widget=self))
|
self.app.post_message_no_wait(events.Remove(self, widget=self))
|
||||||
|
|
||||||
def render(self) -> RenderableType:
|
def render(self) -> RenderableType:
|
||||||
|
|||||||
Reference in New Issue
Block a user