Repository: nvaccess/nvda

Issue:
nvda is not reading line by line emails when using the native windows 10 email application 

### Steps to reproduce:
open an email in the native email app on windows 10 to view emails
walk with the arrow below to read the email line by line. 
### Actual behavior:
nvda keeps repeating the current line with the focus. 
### Expected behavior:
nvda should read the email line by line 
### System configuration
#### NVDA installed/portable/running from source:
instaled
#### NVDA version:
nvda.exe, NVDA alpha-21810,db664bef

#### Windows version:
10.0.19043.844
#### Name and version of other software in use when reproducing the issue:
HxOutlook.exe, microsoft.windowscommunicationsapps 16005.13426.20688.0

#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your computer?
yes
#### Have you tried any other versions of NVDA? If so, please report their behaviors.
no
#### If add-ons are disabled, is your problem still occurring?
yes
#### Did you try to run the COM registry fixing tool in NVDA menu / tools?
no
log:
[email.txt](https://github.com/nvaccess/nvda/files/6085236/email.txt)



Discussion:
Hi,

Confirmed - traced to tree interceptor changes introduced in #12051. CC @MichaelDCurran 
@fernando-jose-silva Is this still reproducible for you?
yes the problem is still reproducible.
I found out that the problem is due when opening an email the nvda is not automatically going into browsing mode.
If I open an e-mail to force the navigation mode with nvda + space everything works fine.
It is an annoying problem, since every open email you need to go to browsing mode.
This is a regression of the alpha versions.
Checking the option in the autofocus mode when the focus changes has no effect on this problem.
Thanks. 
@michaelDCurran  Ping. Would it be possible to look into this before 2021.1 as it is clearly a regression.
Yes, this will get done before 2021.1.



Resolving patch:
diff --git a/source/NVDAObjects/IAccessible/winword.py b/source/NVDAObjects/IAccessible/winword.py
--- a/source/NVDAObjects/IAccessible/winword.py
+++ b/source/NVDAObjects/IAccessible/winword.py
@@ -21,14 +21,11 @@
 from NVDAObjects.window import DisplayModelEditableText
 from ..behaviors import EditableTextWithoutAutoSelectDetection
 from NVDAObjects.window.winword import *
-from NVDAObjects.window.winword import WordDocumentTreeInterceptor
-
 
 class WordDocument(IAccessible,EditableTextWithoutAutoSelectDetection,WordDocument):
  
-	treeInterceptorClass = WordDocumentTreeInterceptor
-	shouldCreateTreeInterceptor = True
-
+	treeInterceptorClass=WordDocumentTreeInterceptor
+	shouldCreateTreeInterceptor=False
 	TextInfo=WordDocumentTextInfo
 
 	def _get_ignoreEditorRevisions(self):
diff --git a/source/NVDAObjects/UIA/wordDocument.py b/source/NVDAObjects/UIA/wordDocument.py
--- a/source/NVDAObjects/UIA/wordDocument.py
+++ b/source/NVDAObjects/UIA/wordDocument.py
@@ -298,14 +298,6 @@ def getTextWithFields(self,formatConfig=None):
 
 class WordBrowseModeDocument(UIABrowseModeDocument):
 
-	# This treeInterceptor starts in focus mode, thus escape should not switch back to browse mode
-	disableAutoPassThrough = True
-
-	def __init__(self, rootNVDAObject):
-		super(WordBrowseModeDocument, self).__init__(rootNVDAObject)
-		self.passThrough = True
-		browseMode.reportPassThrough.last = True
-
 	def shouldSetFocusToObj(self,obj):
 		# Ignore strange editable text fields surrounding most inner fields (links, table cells etc) 
 		if obj.role==controlTypes.ROLE_EDITABLETEXT and obj.UIAElement.cachedAutomationID.startswith('UIA_AutomationId_Word_Content'):
@@ -349,8 +341,8 @@ def _get_role(self):
 		return role
 
 class WordDocument(UIADocumentWithTableNavigation,WordDocumentNode,WordDocumentBase):
-	treeInterceptorClass = WordBrowseModeDocument
-	shouldCreateTreeInterceptor = True
+	treeInterceptorClass=WordBrowseModeDocument
+	shouldCreateTreeInterceptor=False
 	announceEntireNewLine=True
 
 	# Microsoft Word duplicates the full title of the document on this control, which is redundant as it appears in the title of the app itself.
diff --git a/source/NVDAObjects/window/winword.py b/source/NVDAObjects/window/winword.py
--- a/source/NVDAObjects/window/winword.py
+++ b/source/NVDAObjects/window/winword.py
@@ -1069,14 +1069,6 @@ def _get_focusableNVDAObjectAtStart(self):
 
 class WordDocumentTreeInterceptor(browseMode.BrowseModeDocumentTreeInterceptor):
 
-	# This treeInterceptor starts in focus mode, thus escape should not switch back to browse mode
-	disableAutoPassThrough = True
-
-	def __init__(self, rootNVDAObject):
-		super(WordDocumentTreeInterceptor, self).__init__(rootNVDAObject)
-		self.passThrough = True
-		browseMode.reportPassThrough.last = True
-
 	TextInfo=BrowseModeWordDocumentTextInfo
 
 	def _activateLongDesc(self,controlField):


Test patch: