[orca] Attempt to identify and ignore bogus events from background etherpad
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Attempt to identify and ignore bogus events from background etherpad
- Date: Fri, 8 Feb 2019 17:02:50 +0000 (UTC)
commit 21aff9d5fb6252ee44f2a29f96f1018e84576426
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Feb 8 12:01:32 2019 -0500
Attempt to identify and ignore bogus events from background etherpad
src/orca/scripts/web/script.py | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 96a2d6b5c..d83975135 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1465,6 +1465,11 @@ class Script(default.Script):
if self.utilities.isContentEditableWithEmbeddedObjects(event.source):
msg = "WEB: In content editable with embedded objects"
debug.println(debug.LEVEL_INFO, msg, True)
+ if not self.utilities.eventIsFromLocusOfFocusDocument(event):
+ msg = "WEB: Event ignored: Not from locus of focus document"
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return True
+
self.utilities.setCaretContext(obj, offset)
notify = not self.utilities.lastInputEventWasCharNav() \
and not self.utilities.isEntryDescendant(obj)
@@ -1874,6 +1879,11 @@ class Script(default.Script):
debug.println(debug.LEVEL_INFO, msg, True)
return True
+ if not self.utilities.eventIsFromLocusOfFocusDocument(event):
+ msg = "WEB: Event ignored: Not from locus of focus document"
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return True
+
obj, offset = self.utilities.getCaretContext()
ancestor = self.utilities.commonAncestor(obj, event.source)
if ancestor and self.utilities.isTextBlockElement(ancestor):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]