[orca] Attempt to work around Google Docs editor exposed as ROLE_UNKNOWN by Firefox
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Attempt to work around Google Docs editor exposed as ROLE_UNKNOWN by Firefox
- Date: Sat, 17 Oct 2015 05:48:47 +0000 (UTC)
commit 672d13d984f38d7703fb5e20675124482963a0e7
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sat Oct 17 01:47:02 2015 -0400
Attempt to work around Google Docs editor exposed as ROLE_UNKNOWN by Firefox
src/orca/scripts/web/script.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 023f2c1..fb37ec6 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -977,6 +977,11 @@ class Script(default.Script):
if self.utilities.inFindToolbar(oldFocus):
newFocus, caretOffset = self.utilities.getCaretContext()
+ if newFocus.getRole() == pyatspi.ROLE_UNKNOWN:
+ msg = "WEB: Event source has bogus role. Likely browser bug."
+ debug.println(debug.LEVEL_INFO, msg)
+ newFocus, offset = self.utilities.findFirstCaretContext(newFocus, 0)
+
text = self.utilities.queryNonEmptyText(newFocus)
if text and (0 <= text.caretOffset < text.characterCount):
caretOffset = text.caretOffset
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]