[orca] Ignore events from Mozilla's self-repair hidden page
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Ignore events from Mozilla's self-repair hidden page
- Date: Thu, 21 Apr 2016 21:14:25 +0000 (UTC)
commit a029b673d6dab0beaf8896d625a4824400a14134
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Apr 21 17:13:12 2016 -0400
Ignore events from Mozilla's self-repair hidden page
src/orca/scripts/toolkits/Gecko/script.py | 14 ++++++++++++++
src/orca/scripts/web/script.py | 6 +++++-
2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 1c7ab5a..95e4f5d 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -79,6 +79,20 @@ class Script(web.Script):
def onBusyChanged(self, event):
"""Callback for object:state-changed:busy accessibility events."""
+ try:
+ name = event.source.name
+ except:
+ msg = "GECKO: Exception getting name of event source"
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return
+
+ # Sadly this document frame claims to be visible and showing and have all
+ # the other characteristics of a real page. Hence the name check.
+ if "self-repair.mozilla.org" in name:
+ msg = "GECKO: Ignoring event because it's not a real (to users) page"
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return
+
if super().onBusyChanged(event):
return
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 5b064fa..0148fe0 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1281,7 +1281,11 @@ class Script(default.Script):
return True
char = text.getText(event.detail1, event.detail1+1)
- isEditable = obj.getState().contains(pyatspi.STATE_EDITABLE)
+ try:
+ isEditable = obj.getState().contains(pyatspi.STATE_EDITABLE)
+ except:
+ isEditable = False
+
if not char and not isEditable:
msg = "WEB: Event ignored: Was for empty char in non-editable text"
debug.println(debug.LEVEL_INFO, msg, True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]