When moving review cursor to the browse mode document set it to the position of the browse mode caret#11376
Merged
Merged
Conversation
…cument set review cursor to the position of the browse mode caret/ Fixes nvaccess#9622
feerrenrut
suggested changes
Jul 17, 2020
feerrenrut
left a comment
Contributor
There was a problem hiding this comment.
Ok, looks like I was a little confused on the initial issue. Overall this looks fine, but please update the testing steps to include gestures used / observations to make reproducing your testing (and variations of it) faster.
| except (NotImplementedError,RuntimeError): | ||
| pos=obj.makeTextInfo(textInfos.POSITION_FIRST) | ||
| api.setReviewPosition(pos) | ||
| TIAtCaret = self._getTIAtCaret(True) |
Contributor
There was a problem hiding this comment.
please start variables with lower case, otherwise they look like classes / types
Suggested change
| TIAtCaret = self._getTIAtCaret(True) | |
| tIAtCaret = self._getTIAtCaret(True) | |
Contributor
Author
There was a problem hiding this comment.
Done so. I've decided to start the variable name with upper case T just because PEP 8 recommends to capitalize all letters of the acronyms and ti is obviously short for TextInfo.
Contributor
Author
|
@feerrenrut I hope the updated testing steps are sufficient. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Closes #9622
Summary of the issue:
When moving review cursor to focus and focused control is a browse mode document the review cursor position is set at the position of the focus not the browse mode caret. It is problematic because most of the time the focused control is a document window which isn't really interesting. This is also inconsistent with other windows with caret - in these cases review cursor is set to the caret position,
Description of how this pull request fixes the issue:
When the focused control is a browse mode document review cursor is set to the position of the browse mode caret.
Testing performed:
With Focus focusable elements enabled and disabled.
Known issues with pull request:
In #9622 @feerrenrut requested a separate script for moving to the focus which this PR doesn't implement. As I've explained in #9622 such script makes no sense IMO - outside of browse mode it would be redundant, and in browse mode the focused object is either the document window or some object which no longer is interesting to the user.
Change log entry:
Section: Changes:
When moving review cursor to focus in browse mode it is now set at the position of the virtual caret.