Add temporary access to chrome://accessibility (workaround for #12036)
This commit is contained in:
parent
c5041403f8
commit
0a79f6d1bf
2 changed files with 26 additions and 0 deletions
|
@ -614,6 +614,14 @@ export class VSCodeMenu {
|
|||
enabled: (this.windowsService.getWindowCount() > 0)
|
||||
});
|
||||
|
||||
const showAccessibilityOptions = new MenuItem({
|
||||
label: mnemonicLabel(nls.localize({ key: 'miAccessibilityOptions', comment: ['&& denotes a mnemonic'] }, "Accessibility &&Options")),
|
||||
accelerator: null,
|
||||
click: () => {
|
||||
this.windowsService.openAccessibilityOptions();
|
||||
}
|
||||
});
|
||||
|
||||
const issueUrl = generateNewIssueUrl(product.reportIssueUrl, pkg.name, pkg.version, product.commit, product.date);
|
||||
|
||||
arrays.coalesce([
|
||||
|
@ -646,6 +654,7 @@ export class VSCodeMenu {
|
|||
}) : null,
|
||||
(this.envService.product.licenseUrl || this.envService.product.privacyStatementUrl) ? __separator__() : null,
|
||||
toggleDevToolsItem,
|
||||
platform.isWindows ? showAccessibilityOptions : null
|
||||
]).forEach((item) => helpMenu.append(item));
|
||||
|
||||
if (!platform.isMacintosh) {
|
||||
|
|
|
@ -99,6 +99,7 @@ export interface IWindowsService {
|
|||
openFileFolderPicker(forceNewWindow?: boolean): void;
|
||||
openFilePicker(forceNewWindow?: boolean): void;
|
||||
openFolderPicker(forceNewWindow?: boolean): void;
|
||||
openAccessibilityOptions(): void;
|
||||
focusLastActive(cli: ICommandLineArguments): VSCodeWindow;
|
||||
getLastActiveWindow(): VSCodeWindow;
|
||||
findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): VSCodeWindow;
|
||||
|
@ -1068,6 +1069,22 @@ export class WindowsManager implements IWindowsService {
|
|||
this.doPickAndOpen({ pickFolders: true, forceNewWindow });
|
||||
}
|
||||
|
||||
public openAccessibilityOptions(): void {
|
||||
let win = new BrowserWindow({
|
||||
alwaysOnTop: true,
|
||||
skipTaskbar: true,
|
||||
resizable: false,
|
||||
width: 450,
|
||||
height: 300,
|
||||
show: true,
|
||||
title: nls.localize('accessibilityOptionsWindowTitle', "Accessibility Options")
|
||||
});
|
||||
|
||||
win.setMenuBarVisibility(false);
|
||||
|
||||
win.loadURL('chrome://accessibility');
|
||||
}
|
||||
|
||||
private doPickAndOpen(options: INativeOpenDialogOptions): void {
|
||||
this.getFileOrFolderPaths(options, (paths: string[]) => {
|
||||
if (paths && paths.length) {
|
||||
|
|
Loading…
Reference in a new issue