From 9014535ae076ad58d0cae1d088fa337e7e10e998 Mon Sep 17 00:00:00 2001 From: cary-rowen Date: Mon, 30 Dec 2024 22:45:33 +0800 Subject: [PATCH] Fix issue with certain SECTION elements not being recognized as editable controls in Visual Studio Code --- source/appModules/code.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/appModules/code.py b/source/appModules/code.py index facaeb60a1e..94b2f9bb590 100644 --- a/source/appModules/code.py +++ b/source/appModules/code.py @@ -26,10 +26,8 @@ def chooseNVDAObjectOverlayClasses(self, obj, clsList): clsList.insert(0, VSCodeDocument) def event_NVDAObject_init(self, obj: NVDAObject): - # This is a specific fix for Visual Studio Code, - # However, the root cause of the issue is issue #15159. - # Once issue #15159 is fixed, - # The PR #16248 that introduced this code can be immediately reverted. - # (see issue #15159 for full description) - if obj.role != controlTypes.Role.EDITABLETEXT: + # TODO: This is a specific fix for Visual Studio Code. + # Once the underlying issue is resolved, this workaround can be removed. + # See issue #15159 for more details. + if obj.role != controlTypes.Role.EDITABLETEXT and controlTypes.State.EDITABLE not in obj.states: obj.TextInfo = NVDAObjectTextInfo