Stop using UnidentifiedEdit in Fast Log Entry edit field#11488
Conversation
|
@LeonarddeR You may be interested in reviewing this. |
|
What else uses |
|
DisplayModelEditableText is still used in quite a few places in the wild. Having said that, I think it makes sense to test this and see whether any regressions are reported. |
LeonarddeR
left a comment
There was a problem hiding this comment.
This appModule shares logic in thechooseNVDAObjectOverlayClasses and event_NVDAObject_init methods. Therefore, I prefer this to be changed in such a way that you create a new overlay class that's added in chooseNVDAObjectOverlayClasses, which inherrits both from DisplayModelEditableText and EditableTextWithoutAutoSelectDetection. It can then override name to return None. I think this causes the least chance of regression possible so it also addresses @feerrenrut 's concern
|
@feerrenrut wrote:
It is used in various editable text cases when NVDA cannot access text otherwise.
First of all |
|
@lukaszgo1 commented on Aug 13, 2020, 2:59 PM GMT+2:
While this is true, theoretically it might be the case that selection is reported erroneously in controls using this. |
|
@LeonarddeR wrote:
Done
While we are avoiding possible regressions this way we then have to either do that for every If we consider #8996 serious enough to include a fix for it into 2020.3 then I agree option 2 is the proper fix and I'll implement it. If the fix can wait until 2020.4 however, I'd rather leave this pr as is and ask @feerrenrut or @michaelDCurran to merge it early during 2020.4 development cycle and let the change from Also regarding this:
I agree that it is theoretically possible, however:
|
This makes sense to me. I believe the merge window for 2020.3 is now closed. |
|
Looking at this again, It occurs to me that TSynMemo is a Delphi control that is likely to be used much more generally. See https://github.com/SynEdit/SynEdit/ |
|
@LeonarddeR wrote:
I don't think this is a good idea. This control is used, for example, in Dev-C++ and there WindowText contains the real text of the control. |
|
Ah, that's great. |
feerrenrut
left a comment
There was a problem hiding this comment.
Thanks @lukaszgo1 looks good to me.
…s#11488) Fixes nvaccess#8996 In nvaccess#8165 we started using Unidentifiededit for editable text fields in which there is a caret and which seems to support Edit API. While both of these criterion's are true for Fast Log Entry edit fields their WindowText contains complete garbage and UnidentifiedEdit relies on Windowtext being correct. Instead: 1. For edit field in Fast Log Entry DisplayModelEditableText is used similar to the pre nvaccess#8165 2. DisplayModelEditableText no longer inherits from EditableText rather from EditableTextWithoutAutoSelectDetection which makes selection announced when the color used for highlight in a particular app is the default Windows highlight color - This has been suggested by @jcsteh in nvaccess#4535
Link to issue number:
Fixes #8996
Summary of the issue:
In #8165 we started using Unidentifiededit for editable text fields in which there is a caret and which seems to support Edit API. While both of these criterion's are true for Fast Log Entry edit fields their WindowText contains complete garbage and UnidentifiedEdit relies on Windowtext being correct.
Description of how this pull request fixes the issue:
Testing performed:
Ensured that main edit field in Fast Log Entry is once again readable and that selection is announced in most cases.
The try build has also been tested by the original reporter and the issue is fixed for him as well.
Known issues with pull request:
Change log entry:
Section: Bug fixes