nvda
eacde5e2 - Handle error when creating TextInfo from alleged caret object (#17212)

Commit
1 year ago
Handle error when creating TextInfo from alleged caret object (#17212) Partially fixes #17198 Summary of the issue: When using the Microsoft Pinyin Input Method for Chinese and enabling the Pinyin compatibility option to use the previous version, typing in LibreOffice (e.g. Writer or Calc) while an IME popup was showing triggered an error, caused by the attempt to create a text info for an object from the IME popup that's not actually part of the LibreOffice accessibility tree, and that doesn't provide any means to get the current caret position. This is due to `CompoundDocument._get_caretObject` returning the last queued focus object, which isn't necessarily the object that the caret change event has actually been sent for, and might be an object that doesn't support reporting of a caret position altogether. Description of user facing changes When using the Microsoft Pinyin Input Method for Chinese and enabling the Pinyin compatibility option to use the previous version, typing in LibreOffice Writer (and potentially other applications) while an IME popup is showing no longer triggers an error. Description of development approach: Handle the `NotImplementedError` error that may get thrown in `CompoundDocument.event_caret`. Known issues: None, but note that other than Writer, the case of using Calc still shows more issues, i.e. this is only a partial fix for the use case described in that ticket.
Parents
Loading