[orca] Handle caret offsets of -1 when getting the text of non-focused objects
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Handle caret offsets of -1 when getting the text of non-focused objects
- Date: Wed, 19 Dec 2012 12:31:07 +0000 (UTC)
commit b6c615ac4e3bfb8373ad6b98c2af8b22939da002
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Dec 19 13:30:17 2012 +0100
Handle caret offsets of -1 when getting the text of non-focused objects
.../scripts/toolkits/Gecko/script_utilities.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script_utilities.py b/src/orca/scripts/toolkits/Gecko/script_utilities.py
index a659b41..4559c36 100644
--- a/src/orca/scripts/toolkits/Gecko/script_utilities.py
+++ b/src/orca/scripts/toolkits/Gecko/script_utilities.py
@@ -528,7 +528,7 @@ class Utilities(script_utilities.Utilities):
text = self.queryNonEmptyText(obj)
if text:
if offset == None:
- offset = text.caretOffset
+ offset = max(0, text.caretOffset)
if boundary:
[string, start, end] = \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]