[orca] Ignore text-selection-changed events from Gecko objects which have no text
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Ignore text-selection-changed events from Gecko objects which have no text
- Date: Sun, 19 Apr 2015 19:37:06 +0000 (UTC)
commit 8820361476e2735dd3de2d4cd726f0a6d62819b7
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sun Apr 19 15:35:19 2015 -0400
Ignore text-selection-changed events from Gecko objects which have no text
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 758812d..a1523ae 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -1033,6 +1033,11 @@ class Script(default.Script):
return True
text = self.utilities.queryNonEmptyText(event.source)
+ if not text:
+ msg = "INFO: Text-selection event ignored: There's no text"
+ debug.println(debug.LEVEL_INFO, msg)
+ return
+
char, start, end = text.getTextAtOffset(text.caretOffset, pyatspi.TEXT_BOUNDARY_CHAR)
if char == self.EMBEDDED_OBJECT_CHARACTER:
msg = "INFO: Text-selection event ignored: Caret offset is at embedded object"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]