Skip to content

Commit 2bc1100

Browse files
Merge 71dd672 into cb35653
2 parents cb35653 + 71dd672 commit 2bc1100

File tree

5 files changed

+29
-37
lines changed

5 files changed

+29
-37
lines changed

source/NVDAObjects/UIA/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,11 +2019,13 @@ def doAction(self,index=None):
20192019
if index==0:
20202020
if self.UIAInvokePattern:
20212021
self.UIAInvokePattern.Invoke()
2022-
elif self.UIATogglePattern:
2022+
return
2023+
if self.UIATogglePattern:
20232024
self.UIATogglePattern.toggle()
2024-
elif self.UIASelectionItemPattern:
2025+
return
2026+
if self.UIASelectionItemPattern:
20252027
self.UIASelectionItemPattern.select()
2026-
return
2028+
return
20272029
raise NotImplementedError
20282030

20292031
def _get_hasFocus(self):

source/UIAHandler/browseMode.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -500,12 +500,6 @@ def _iterNodesByType(self,nodeType,direction="next",pos=None):
500500
return UIAControlQuicknavIterator(nodeType,self,pos,condition,direction)
501501
raise NotImplementedError
502502

503-
def _activateNVDAObject(self,obj):
504-
try:
505-
obj.doAction()
506-
except NotImplementedError:
507-
pass
508-
509503
def _get_isAlive(self):
510504
if not winUser.isWindow(self.rootNVDAObject.windowHandle):
511505
return False

source/browseMode.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
import wx
2121
import core
22+
import winUser
23+
import mouseHandler
2224
from logHandler import log
2325
import documentBase
2426
import review
@@ -523,10 +525,27 @@ def _activateNVDAObject(self, obj):
523525
@param obj: The object to activate.
524526
@type obj: L{NVDAObjects.NVDAObject}
525527
"""
526-
try:
527-
obj.doAction()
528-
except NotImplementedError:
529-
log.debugWarning("doAction not implemented")
528+
while obj and obj != self.rootNVDAObject:
529+
try:
530+
obj.doAction()
531+
break
532+
except:
533+
log.debugWarning("doAction failed")
534+
if obj.hasIrrelevantLocation:
535+
# This check covers invisible, off screen and a None location
536+
log.debugWarning("No relevant location for object")
537+
obj = obj.parent
538+
continue
539+
location = obj.location
540+
if not location.width or not location.height:
541+
obj = obj.parent
542+
continue
543+
log.debugWarning("Clicking with mouse")
544+
oldX, oldY = winUser.getCursorPos()
545+
winUser.setCursorPos(*location.center)
546+
mouseHandler.doPrimaryClick()
547+
winUser.setCursorPos(oldX, oldY)
548+
break
530549

531550
def _activatePosition(self, obj=None):
532551
if not obj:

source/virtualBuffers/gecko_ia2.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import NVDAObjects.IAccessible.mozilla
1616
import NVDAObjects.behaviors
1717
import winUser
18-
import mouseHandler
1918
import IAccessibleHandler
2019

2120
import oleacc
@@ -391,29 +390,6 @@ def _activateLongDesc(self,controlField):
391390
obj=self.getNVDAObjectFromIdentifier(docHandle,ID)
392391
obj.doAction(index)
393392

394-
def _activateNVDAObject(self, obj):
395-
while obj and obj != self.rootNVDAObject:
396-
try:
397-
obj.doAction()
398-
break
399-
except:
400-
log.debugWarning("doAction failed")
401-
if obj.hasIrrelevantLocation:
402-
# This check covers invisible, off screen and a None location
403-
log.debugWarning("No relevant location for object")
404-
obj = obj.parent
405-
continue
406-
location = obj.location
407-
if not location.width or not location.height:
408-
obj = obj.parent
409-
continue
410-
log.debugWarning("Clicking with mouse")
411-
oldX, oldY = winUser.getCursorPos()
412-
winUser.setCursorPos(*location.center)
413-
mouseHandler.doPrimaryClick()
414-
winUser.setCursorPos(oldX, oldY)
415-
break
416-
417393
def _searchableTagValues(self, values):
418394
return values
419395

user_docs/en/changes.t2t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ It is also updated with UIA enabled, when typing text and braille is tethered to
5353
- When using say all or commands which spell text, pauses between sentences or characters no longer gradually decrease over time. (#15739)
5454
- NVDA no longer sometimes freezes when speaking a large amount of text. (#15752)
5555
- More objects which contain useful text are detected, and text content is displayed in braille. (#15605)
56+
- When accessing Microsoft Edge using UI Automation, NVDA is able to activate more controls in browse mode. (#14612)
5657
-
5758

5859
== Changes for Developers ==

0 commit comments

Comments
 (0)