Skip to content

Commit 9014535

Browse files
committed
Fix issue with certain SECTION elements not being recognized as editable controls in Visual Studio Code
1 parent 9390788 commit 9014535

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎source/appModules/code.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ def chooseNVDAObjectOverlayClasses(self, obj, clsList):
2626
clsList.insert(0, VSCodeDocument)
2727

2828
def event_NVDAObject_init(self, obj: NVDAObject):
29-
# This is a specific fix for Visual Studio Code,
30-
# However, the root cause of the issue is issue #15159.
31-
# Once issue #15159 is fixed,
32-
# The PR #16248 that introduced this code can be immediately reverted.
33-
# (see issue #15159 for full description)
34-
if obj.role != controlTypes.Role.EDITABLETEXT:
29+
# TODO: This is a specific fix for Visual Studio Code.
30+
# Once the underlying issue is resolved, this workaround can be removed.
31+
# See issue #15159 for more details.
32+
if obj.role != controlTypes.Role.EDITABLETEXT and controlTypes.State.EDITABLE not in obj.states:
3533
obj.TextInfo = NVDAObjectTextInfo

0 commit comments

Comments
 (0)