[orca] Handle index error when working around broken web text implementations
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Handle index error when working around broken web text implementations
- Date: Mon, 18 Mar 2019 17:53:36 +0000 (UTC)
commit 82aa9f2a04afb47129a50a19645e009545894224
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Mar 18 13:52:49 2019 -0400
Handle index error when working around broken web text implementations
src/orca/scripts/web/script_utilities.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 42c74f6fe..5b2d51ee7 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -976,7 +976,11 @@ class Utilities(script_utilities.Utilities):
allText = text.getText(0, -1)
if boundary == pyatspi.TEXT_BOUNDARY_CHAR:
- string = allText[offset]
+ try:
+ string = allText[offset]
+ except IndexError:
+ string = ""
+
return string, offset, offset + 1
extents = list(text.getRangeExtents(offset, offset + 1, 0))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]