Skip to content

Commit ce28256

Browse files
authored
Fix reporting of superscript / subscript in Wordpad (#12262)
In IAccessible edit field such as WordPad, enabling "Superscript and subscript" reporting in Document formatting settings was not enough to have them reported. It was also required to have Font attributes reporting enabled. This is due to a forgotten part of the code when reporting of superscript/subscript has been separated from reporting of the other attributes in #10919. Description of how this pull request fixes the issue: Added the missing 'if' statement
1 parent f94aa03 commit ce28256

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎source/NVDAObjects/window/edit.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,9 @@ def _getFormatFieldAtRange(self, textRange, formatConfig):
507507
formatField["italic"]=bool(fontObj.italic)
508508
formatField["underline"]=bool(fontObj.underline)
509509
formatField["strikethrough"]=bool(fontObj.StrikeThrough)
510+
if formatConfig["reportSuperscriptsAndSubscripts"]:
511+
if not fontObj:
512+
fontObj = textRange.font
510513
if fontObj.superscript:
511514
formatField["text-position"]="super"
512515
elif fontObj.subscript:

‎user_docs/en/changes.t2t‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ What's New in NVDA
4242
- The python locale is set to match the language selected in preferences consistently, and will occur when using the default language. (#12214)
4343
- - TextInfo.getTextInChunks no longer freezes when called on Rich Edit controls such as the NVDA log viewer. (#11613)
4444
- It is once again possible to use NVDA in a languages containing underscores in the locale name such as de_CH on Windows 10 1803 and 1809. (#12250)
45+
- In WordPad, configuration of superscript/subscript reporting works as expected. (#12262)
4546

4647

4748
== Changes for Developers ==

0 commit comments

Comments
 (0)