Skip to content

Commit 08c80b9

Browse files
committed
fix defaults
1 parent f9f220d commit 08c80b9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/textual/containers.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def __init__(
8080
id: str | None = None,
8181
classes: str | None = None,
8282
disabled: bool = False,
83-
can_focus: bool = True,
84-
can_focus_children: bool = True,
83+
can_focus: bool | None = None,
84+
can_focus_children: bool | None = None,
8585
) -> None:
8686
"""
8787
@@ -102,8 +102,10 @@ def __init__(
102102
classes=classes,
103103
disabled=disabled,
104104
)
105-
self.can_focus = can_focus
106-
self.can_focus_children = can_focus_children
105+
if can_focus is not None:
106+
self.can_focus = can_focus
107+
if can_focus_children is not None:
108+
self.can_focus_children = can_focus_children
107109

108110

109111
class Vertical(Widget, inherit_bindings=False):

0 commit comments

Comments
 (0)