Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thunderbird: certain characters with some HTML codes break braille output in the compose window #12542

Closed
AAClause opened this issue Jun 12, 2021 · 2 comments · Fixed by #13644
Labels
triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@AAClause
Copy link
Contributor

AAClause commented Jun 12, 2021

Steps to reproduce:

  1. Open Thunderbird.
  2. Create a new message (CTRL+n).
  3. Set the focus on the message body field.
  4. Insert the following HTML code from Insertion menu (alt+i) → HTML... (H).
    <div>😄<br /><hr /><a href="https://nvaccess.org/">nvaccess.org</a></div>
    Please note that this is an intentionally minimal HTML code. I originally encountered this bug with more complex codes.
  5. Once back on the message body field, press uparrow to go the first line.

Actual behavior:

Braille output is not refreshed and the following is raised in the log (speech output OK):

Log
IO - inputCore.InputManager.executeGesture (11:58:43.062) - winInputHook (14280):
Input: kb(laptop):upArrow
DEBUG - editableText.EditableText._hasCaretMoved (11:58:43.117) - MainThread (12080):
Caret move detected using bookmarks. Elapsed: 0 ms
ERROR - scriptHandler.executeScript (11:58:43.162) - MainThread (12080):
error executing script: <bound method EditableText.script_caret_moveByLine of <NVDAObjects.Dynamic_EditableTextWithAutoSelectDetectionDocumentEditorMozillaIAccessible object at 0x08AD8470>> with gesture 'flèche haut'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 208, in executeScript
  File "editableText.pyc", line 224, in script_caret_moveByLine
  File "editableText.pyc", line 163, in _caretMovementScriptHelper
  File "NVDAObjects\behaviors.pyc", line 177, in _caretScriptPostMovedHelper
  File "editableText.pyc", line 149, in _caretScriptPostMovedHelper
  File "speech\speech.pyc", line 1128, in speakTextInfo
  File "speech\types.pyc", line 42, in __iter__
  File "speech\speech.pyc", line 1168, in getTextInfoSpeech
  File "NVDAObjects\IAccessible\ia2TextMozilla.pyc", line 390, in getTextWithFields
  File "NVDAObjects\IAccessible\ia2TextMozilla.pyc", line 329, in _getText
  File "NVDAObjects\IAccessible\ia2TextMozilla.pyc", line 261, in _iterRecursiveText
  File "NVDAObjects\IAccessible\ia2TextMozilla.pyc", line 38, in _getRawTextInfo
AttributeError: 'NoneType' object has no attribute 'role'

Expected behavior:

Braille output should be updated, no error.

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

alpha-23069,94b8fa28

Windows version:

21H1

Name and version of other software in use when reproducing the issue:

Thunderbird 78.11.0 (64 bits)

Other information about your system:

N/A

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

No

If add-ons are disabled, is your problem still occurring?

Yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes

@mwhapples
Copy link
Collaborator

I have made a pull request to fix this in pull request #13644 does that fix this for you? Also does it fix the issue you mentioned in firefox?

@seanbudd seanbudd added the triaged Has been triaged, issue is waiting for implementation. label Apr 27, 2022
@AAClause
Copy link
Contributor Author

Yes, your PR fixes this issue for me. Thanks!

seanbudd pushed a commit that referenced this issue May 2, 2022
Link to issue number:
Closes #12542

Summary of the issue:
In mozilla applications when pasting certain HTML into rich edit controls it can lead to errors when navigating through the text. One such example is in the thunderbird compose message edit area.

Description of how this pull request fixes the issue:
The function _getEmbedded in ia2TextMozilla.py returns Optional, however the return value is never checked to be not None and this assumption leads to errors later on when the value is used. This pull request adds a check for None being returned from _getEmbedded and skips it if None is found.
@nvaccessAuto nvaccessAuto added this to the 2022.2 milestone May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants