[orca] Ignore caret-moved events which we caused by us
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Ignore caret-moved events which we caused by us
- Date: Wed, 20 Aug 2014 00:42:01 +0000 (UTC)
commit 916fada4d44af8a52853665232798e649fa09266
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Aug 19 20:38:49 2014 -0400
Ignore caret-moved events which we caused by us
If Gecko doesn't like where we set the caret, it will emit a caret-moved
event telling us the caret is somewhere else. We were foolishly believing
Gecko and skipping over content we don't want to skip over because Gecko
said we were already at the end of that content.
src/orca/scripts/toolkits/Gecko/script.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index a455e59..9e4dc7b 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -852,6 +852,11 @@ class Script(default.Script):
def onCaretMoved(self, event):
"""Callback for object:text-caret-moved accessibility events."""
+ if self._lastCommandWasCaretNav:
+ msg = "INFO: Caret-moved event ignored: last command was caret nav"
+ debug.println(debug.LEVEL_INFO, msg)
+ return
+
text = self.utilities.queryNonEmptyText(event.source)
if not text:
if event.source.getRole() == pyatspi.ROLE_LINK:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]