Skip to content

Commit

Permalink
Don't clear selection on descendants of tables
Browse files Browse the repository at this point in the history
We want to remove existing selections during caret navigation, but
clearing the text selection on a full table is non-performant. So
just clear it on the table itself and hope the user agent does the
right thing. If it doesn't, let's ask them to.
  • Loading branch information
joanmarie committed Aug 26, 2019
1 parent be20a64 commit 5f17e26
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/orca/scripts/web/script_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -4103,6 +4103,11 @@ def clearTextSelection(self, obj):
if self.isDocument(obj):
return

# For performance reasons. If clearing the selection on a table doesn't
# clear it, file a bug against the user agent in question.
if self.getTable(obj):
return

try:
for child in obj:
self.clearTextSelection(child)
Expand Down

0 comments on commit 5f17e26

Please sign in to comment.