Skip to content

Commit 3c5c610

Browse files
authored
Don't call focus_element because it isn't defined yet (#1445)
1 parent aa80775 commit 3c5c610

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

book/accessibility.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,14 +1026,15 @@ instead. That quirk is a workaround for our browser
10261026
The `click` method can now be rewritten to call `activate_element`
10271027
directly:
10281028

1029-
``` {.python}
1029+
``` {.python replace=focus%20%3d%20elt/focus_element(elt)}
10301030
class Tab:
10311031
def click(self, x, y):
1032+
# ...
10321033
while elt:
10331034
if isinstance(elt, Text):
10341035
pass
10351036
elif is_focusable(elt):
1036-
self.focus_element(elt)
1037+
self.focus = elt
10371038
self.activate_element(elt)
10381039
return
10391040
elt = elt.parent

0 commit comments

Comments
 (0)