Skip to content

Fix: Disable dropdown shows both 'Disable' and 'Disable (Workspace)' when extension is workspace-enabled#311190

Open
Jah-yee wants to merge 2 commits intomicrosoft:mainfrom
Jah-yee:fix/disable-dropdown-issue-244138
Open

Fix: Disable dropdown shows both 'Disable' and 'Disable (Workspace)' when extension is workspace-enabled#311190
Jah-yee wants to merge 2 commits intomicrosoft:mainfrom
Jah-yee:fix/disable-dropdown-issue-244138

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Apr 18, 2026

Summary

When an extension is disabled globally but enabled for workspace (EnabledWorkspace state), the disable button incorrectly shows a dropdown containing both 'Disable' and 'Disable (Workspace)' options.

Root Cause

In src/vs/workbench/contrib/extensions/browser/extensionsActions.ts, DisableGloballyAction was enabled for both EnabledGlobally and EnabledWorkspace states. When in EnabledWorkspace, the extension is already disabled globally — offering to disable it globally again is incorrect.

Fix

Changed the condition to only enable DisableGloballyAction when enablementState === EnabledGlobally:

this.enabled = this.extension.state === ExtensionState.Installed
    && this.extension.enablementState === EnablementState.EnabledGlobally
    && this.extensionEnablementService.canChangeEnablement(this.extension.local);

Fixes #244138


Thank you for your attention. If there are any issues or suggestions, please leave a comment and I will address them promptly.
Warmly, RoomWithOutRoof

Jah-yee added 2 commits April 19, 2026 02:51
Fixes microsoft#132085 - Editor hint in new file can't be reached by tabbing

When rendering formatted text with action links (e.g., '[[action]]'),
the resulting <a> elements now have tabIndex=0 to make them reachable
via keyboard navigation (Tab key).

This fixes an accessibility issue where the 'Select a language' hint
in new untitled editors could not be focused using the Tab key.
…when extension is workspace-enabled

When an extension is disabled globally but enabled for workspace
(EnabledWorkspace state), the disable dropdown incorrectly shows both
'Disable' and 'Disable (Workspace)' options.

DisableGloballyAction should only be enabled when the extension is
EnabledGlobally (i.e., globally enabled and not yet disabled globally).
When in EnabledWorkspace state, the extension is already disabled globally,
so DisableGloballyAction should not be offered.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disabled and enabled (workspace) extension Disable button dropdown contains both "Disable" and "Disable (Workspace)" items

2 participants