Skip to content

Commit

Permalink
Fix exception during vertical paragraph navigation (nvaccess#16276)
Browse files Browse the repository at this point in the history
Closes nvaccess#16274

Summary of the issue:
Exception during vertical navigation when one of page items is offscreen.

Description of user facing changes
N/A

Description of development approach
Previously I was retrieving x coordinate by calling textInfo.pointAtStart. However it appears that this doesn't work when said textInfo is off screen.
Switching to another method:
textInfo.NVDAObjectAtStart.location[0]
  • Loading branch information
mltony authored and Adriani90 committed Mar 13, 2024
1 parent c438142 commit 3596ae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/browseMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def iterFactory(direction: str, pos: textInfos.TextInfo) -> Generator[TextInfoQu
elif itemType == "verticalParagraph":
def paragraphFunc(info: textInfos.TextInfo) -> int | None:
try:
return info.pointAtStart.x
return info.NVDAObjectAtStart.location[0]
except AttributeError:
return None

Expand Down

0 comments on commit 3596ae4

Please sign in to comment.