File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ def _getFocusLossCancellableSpeechCommand(
162162) -> Optional [_CancellableSpeechCommand ]:
163163 if reason != controlTypes .REASON_FOCUS or not speech .manager ._shouldCancelExpiredFocusEvents ():
164164 return None
165+ from NVDAObjects .behaviors import Dialog
165166 from NVDAObjects import NVDAObject
166167 if not isinstance (obj , NVDAObject ):
167168 log .warning ("Unhandled object type. Expected all objects to be descendant from NVDAObject" )
@@ -181,6 +182,8 @@ def isSpeechStillValid():
181182 isLastFocusObj ()
182183 or not previouslyHadFocus ()
183184 or isAncestorOfCurrentFocus ()
185+ # Ensure dialogs gaining focus are reported, EG NVDA Find dialog in a browser
186+ or isinstance (obj , Dialog )
184187 )
185188 return stillValid
186189
@@ -192,6 +195,7 @@ def getDevInfo():
192195 f"isLast: { isLastFocusObj ()} "
193196 f", previouslyHad: { previouslyHadFocus ()} "
194197 f", isAncestorOfCurrentFocus: { isAncestorOfCurrentFocus ()} "
198+ f", is a Dialog: { isinstance (obj , Dialog )} "
195199 )
196200 return _CancellableSpeechCommand (isSpeechStillValid , getDevInfo )
197201
You can’t perform that action at this time.
0 commit comments