Skip to content

added __ne__ to textInfos.TextInfo class#5991

Closed
mohammad-suliman wants to merge 2 commits intonvaccess:masterfrom
mohammad-suliman:implement__ne__toTextInfo
Closed

added __ne__ to textInfos.TextInfo class#5991
mohammad-suliman wants to merge 2 commits intonvaccess:masterfrom
mohammad-suliman:implement__ne__toTextInfo

Conversation

@mohammad-suliman
Copy link
Contributor

I tested NVDA's behavior after the change: unfortunately, backspace script no longer works. no errors in the log, the char before the caret is deleted, but NVDA doesn't make any announcement

@mohammad-suliman
Copy link
Contributor Author

also, the new line script bounded to enter doesn't work after this change.

@jcsteh
Copy link
Contributor

jcsteh commented May 24, 2016 via email

@mohammad-suliman
Copy link
Contributor Author

Yes, with the text edit fields you recommended to test withVS text editorSearch field of start menu 

Get Outlook for iOS

On Tue, May 24, 2016 at 3:43 PM -0700, "James Teh" [email protected] wrote:

Just to clarify, I assume you mean this only breaks for UIA? Or were you

seeing it break elsewhere as well?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@jcsteh
Copy link
Contributor

jcsteh commented May 31, 2016

Regarding backspace, we think expanding to character before creating the bookmark in EditableText._backspaceScriptHelper might fix this. This needs testing, though.

I'm not sure why enter isn't working. Does it just say nothing (instead of the start of the line)? That issue seems strange to me because the bookmarks before and after enter is sent should definitely be different because the cursor has moved, and we're adding to the text, not deleting, so there's no ambiguity.

@mohammad-suliman
Copy link
Contributor Author

if I remember correctly, I concluded it doesn't work depending on prints
to the log. will double check and get back.

On 5/31/2016 9:01 AM, James Teh wrote:

Regarding backspace, we think expanding to character before creating
the bookmark in EditableText._backspaceScriptHelper might fix this.
This needs testing, though.

I'm not sure why enter isn't working. Does it just say nothing
(instead of the start of the line)? That issue seems strange to me
because the bookmarks before and after enter is sent should definitely
be different because the cursor has moved, and we're adding to the
text, not deleting, so there's no ambiguity.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5991 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ANLlKpnx_CK2wQjbZI0NzIMCqORHvcg2ks5qG86hgaJpZM4IlLJn.

@mohammad-suliman
Copy link
Contributor Author

unfortunately, it didn't work, I did the following:

  • added a print to the log before the last line of hasCaretMoved method:
    log.debug("after the while loop")
    return (False,newInfo)
  • tested with VS text editor.
  • in the log: after enter gesture is received, I get the print "after
    while loop"
    something to mention is that NVDA didn't announce anything when pressing
    enter even before the change. and don't think this is a problem because,
    only indents are reported on enter gesture. and indents aren't reported
    for empty lines in VS text editor.

On 5/31/2016 9:01 AM, James Teh wrote:

Regarding backspace, we think expanding to character before creating
the bookmark in EditableText._backspaceScriptHelper might fix this.
This needs testing, though.

I'm not sure why enter isn't working. Does it just say nothing
(instead of the start of the line)? That issue seems strange to me
because the bookmarks before and after enter is sent should definitely
be different because the cursor has moved, and we're adding to the
text, not deleting, so there's no ambiguity.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5991 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ANLlKpnx_CK2wQjbZI0NzIMCqORHvcg2ks5qG86hgaJpZM4IlLJn.

@jcsteh
Copy link
Contributor

jcsteh commented Jun 7, 2016

Regarding backspace, we think expanding to character before creating the bookmark in EditableText._backspaceScriptHelper might fix this. This needs testing, though.

Ug. It fixes the issue for the search box in Explorer, but not the search box in the Win 10 Start Menu.

@mohammad-suliman
Copy link
Contributor Author

Jamie, why we can't use TextSelectionChanged event to determine whether the caret has moved as mentioned in this link under "Interoperability with the System Caret" heading:
https://msdn.microsoft.com/en-us/library/windows/desktop/ff384841%28v=vs.85%29.aspx#SystemCaret
tried to remap the mentioned event to caret event, and added an empty implementation to event_caret in UIA class. and in hasCaretMoved, if there are pending caret events, we return true.
if eventHandler.isPendingEvents("caret"):
return (True, None)
it works fine
maybe if we want to make the code safer, the design will be ugly a bit. is this the problem here?

@jcsteh
Copy link
Contributor

jcsteh commented Jun 7, 2016

Yeah, Mick and I discussed this too. We previously listened for that event. Unfortunately, some controls (I believe WPF 2.5 text controls, but I'd need to hunt down specifics) flood those events, causing major performance problems. There's no way for us to block events for specific controls. Welcome to the agony of UI Automation and it's myriad of stupidly broken implementations, one of the great banes of my existence.

@mohammad-suliman
Copy link
Contributor Author

Fixing this seems to be a not easy challenge!

@jcsteh
Copy link
Contributor

jcsteh commented Jun 8, 2016 via email

@LeonarddeR
Copy link
Collaborator

Could you please update the initial description of this pull request according to the pull request template?

@jcsteh jcsteh added the blocked label Jan 16, 2018
@jcsteh
Copy link
Contributor

jcsteh commented Jan 16, 2018

Adding blocked label since there are open issues for which we don't yet have solutions. See comments above, especially #5991 (comment) and #5991 (comment).

@feerrenrut
Copy link
Contributor

I'm going to close this PR, there has not been any meaningful activity in a long time, and it's not clear what the initial intention was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants