[orca] Web: Further limit when we generate the line for editable with descendants
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Web: Further limit when we generate the line for editable with descendants
- Date: Fri, 26 Feb 2021 15:11:51 +0000 (UTC)
commit f5f716b415e3ff25c4ca7b9b5cdaba48e281ac52
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Feb 26 16:09:00 2021 +0100
Web: Further limit when we generate the line for editable with descendants
The previous commit ensured we spoke just the newly-focused editable
object when Tab was pressed. But the object could be autofocused by
the app, or given focus by mouse click. Therefore only generate the
full line for newly-focused editable objects when Orca's caret nav
or structural nav was used to move into them.
src/orca/scripts/web/script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 63ed12201..f78708987 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1299,7 +1299,7 @@ class Script(default.Script):
contents = self.utilities.getLineContentsAtOffset(newFocus, caretOffset)
utterances = self.speechGenerator.generateContents(contents, priorObj=oldFocus)
elif self.utilities.isContentEditableWithEmbeddedObjects(newFocus) \
- and not self.utilities.lastInputEventWasTab() \
+ and (self._lastCommandWasCaretNav or self._lastCommandWasStructNav) \
and not (newFocus.getRole() == pyatspi.ROLE_TABLE_CELL and newFocus.name):
msg = "WEB: New focus %s content editable. Generating line contents." % newFocus
debug.println(debug.LEVEL_INFO, msg, True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]