-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
UI Automation in Windows Console: fix setEndPoint/compareEndPoints #10043
UI Automation in Windows Console: fix setEndPoint/compareEndPoints #10043
Conversation
I see why you brought back isCollapsed. I have a small concern though.
I think it makes sense to rename _get_isCollapsed to _get_isEmpty. endPointHelper can get ifEmpty and isCollapsed can just return it. |
Closing to possibly work around a Github bug. Identical PR pending. |
This PR does not seem to be updating from the source branch, it is missing commit |
I think that if there is a possible github bug, in most cases there are
better ways to work around them than simply closing the pull request and
opening a new one. A force push can help, for example. Same applies to
switching the base branch. In the future, could you please ask for
assistance to work around a bug rather than opening a new pr? This also
offers the benefit of finding out what went wrong in order to avoid it
in the future. Thanks a lot!
|
@LeonarddeR, Bill opened a new PR at my request. I wanted to preserve the state of this PR for the Github bug report. I hadn't considered that opening a new PR would close this one. |
thanks for clarifying!
|
Closes #10035 Related to #9614 Identical to #10043 Works around a UIA bug on Windows 10 1803 and later that means we can not trust the "end" endpoint of a collapsed (empty) text range for comparisons. The console incorrectly reports the "end" as being past the "start" endpoint. This stops braille being able to properly track the system caret in Windows Console. Instead use getText(1) on the textRange to attempt to fetch 1 character. getText returns an empty string for a collapsed range. By definition, the "start" and "end" endpoints for a collapsed range are equivalent, thus read from the "start" endpoint of a collapsed range instead of the "end" endpoint.
Link to issue number:
Closes #10035. Related to #9614.
Summary of the issue:
Braille does not properly track the system caret in Windows Console.
Description of how this pull request fixes the issue:
#9802 introduced a patched implementation of
_get_isCollapsed
. As suggested by @LeonarddeR, this code has been factored out into a new_endPointHelper
method which normalizes endPoints forcompareEndPoints
andsetEndPoint
(used by_get_isCollapsed
, Braille support, and possibly others).Testing performed:
Tested that the
isCollapsed
property behaves as expected (in the Python console). Testing by @LeonarddeR indicates that Braille behaves as expected after the change.Known issues with pull request:
None.
Change log entry:
None.