[orca] Web: Improve behavior when focused back/forward button is pressed
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Web: Improve behavior when focused back/forward button is pressed
- Date: Mon, 8 Nov 2021 12:20:02 +0000 (UTC)
commit 6afadbe78cba7609b7320d0007203380638f2bc1
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Nov 8 13:15:44 2021 +0100
Web: Improve behavior when focused back/forward button is pressed
If the back/forward button is focused and pressed (as opposed to
Alt+Left/Right being used) we should not do a page summary or update
the focus away from that button.
src/orca/scripts/web/script.py | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 08d16e760..cebd30764 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1492,6 +1492,15 @@ class Script(default.Script):
return True
self.utilities.clearCachedObjects()
+ if self.utilities.isDead(obj):
+ obj = None
+
+ if not self.utilities.isDead(orca_state.locusOfFocus) \
+ and not self.utilities.inDocumentContent(orca_state.locusOfFocus) \
+ and orca_state.locusOfFocus.getState().contains(pyatspi.STATE_FOCUSED):
+ msg = "WEB: Not presenting content, focus is outside of document"
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return True
if _settingsManager.getSetting('pageSummaryOnLoad') and shouldPresent:
obj = obj or event.source
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]