From 11344401810a5ec00f3eb620e86525a700835a05 Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Thu, 21 Jun 2018 08:21:00 -0700 Subject: [PATCH] Edge: review actionn (limit notificaiton context to Edge). Re #8423. Reviewed by @LeonardDer: limit Edge notificaiton context to Edge only. This is done by checking to make sure focused element is indeed part of Edge, and if not, notifications will be silenced. This resolves an issue where Edge notifications are heard while using other apps. --- source/appModules/microsoftedge.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/appModules/microsoftedge.py b/source/appModules/microsoftedge.py index 79cb28cc4ea..f94c44106ea 100644 --- a/source/appModules/microsoftedge.py +++ b/source/appModules/microsoftedge.py @@ -7,6 +7,7 @@ """appModule for Microsoft Edge main process""" import appModuleHandler +import api import ui class AppModule(appModuleHandler.AppModule): @@ -14,4 +15,7 @@ class AppModule(appModuleHandler.AppModule): def event_UIA_notification(self, obj, nextHandler, displayString=None, **kwargs): # #8423: even though content process is focused, notifications are fired by main Edge process. # The base object will simply ignore this, so notifications must be announced here and no more. - ui.message(displayString) + # And no, notifications should be limited to Edge context - that is, focused item is part of Edge (both main and content processes). + if api.getFocusObject().appModule.appName.startswith("microsoftedge"): + ui.message(displayString) +