Skip to content

Commit

Permalink
Fix issue with certain SECTION elements not being recognized as edita…
Browse files Browse the repository at this point in the history
…ble controls in Visual Studio Code
  • Loading branch information
cary-rowen committed Dec 30, 2024
1 parent 9390788 commit 9014535
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions source/appModules/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9014535

Please sign in to comment.