Skip to content

Commit 8ded89e

Browse files
committed
Firefox fixes
1 parent 4c4a179 commit 8ded89e

2 files changed

Lines changed: 33 additions & 15 deletions

File tree

scripts/vscode.patch

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,31 @@ index 618861a5be..9d4fdea14e 100644
1111
+ withBase(path: string ): string;
1212
+ withBase(resource: { path: string }): { toString: (skipEncoding?: boolean) => string };
1313
}
14+
diff --git a/src/vs/base/browser/ui/menu/menu.ts b/src/vs/base/browser/ui/menu/menu.ts
15+
index 7913bb42fd..80d5970970 100644
16+
--- a/src/vs/base/browser/ui/menu/menu.ts
17+
+++ b/src/vs/base/browser/ui/menu/menu.ts
18+
@@ -22,7 +22,7 @@ import { isLinux, isMacintosh } from 'vs/base/common/platform';
19+
20+
function createMenuMnemonicRegExp() {
21+
try {
22+
- return new RegExp('\\(&([^\\s&])\\)|(?<!&)&([^\\s&])');
23+
+ return new RegExp('\\(&([^\\s&])\\)|([^&]|^)&([^\\s&])');
24+
} catch (err) {
25+
return new RegExp('\uFFFF'); // never match please
26+
}
27+
@@ -799,7 +799,7 @@ export function cleanMnemonic(label: string): string {
28+
return label;
29+
}
30+
31+
- const mnemonicInText = matches[0].charAt(0) === '&';
32+
+ const mnemonicInText = matches[3]; // matches[0].charAt(0) === '&';
33+
34+
- return label.replace(regex, mnemonicInText ? '$2' : '').trim();
35+
-}
36+
\ No newline at end of file
37+
+ return label.replace(regex, mnemonicInText ? '$2$3' : '').trim();
38+
+}
1439
diff --git a/src/vs/base/common/buffer.ts b/src/vs/base/common/buffer.ts
1540
index 7b4e9cc8d6..7722cb12c6 100644
1641
--- a/src/vs/base/common/buffer.ts

src/media/firefox.css

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
@supports (-moz-appearance:none) {
2-
/*
3-
.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-button.monaco-text-button {
4-
max-width: 100%;
5-
width: auto;
2+
/* Firefox doesn't support -webkit-margin-{before/after} so use margin. */
3+
/* These are the collapsible section headings in a sidebar panel. */
4+
.monaco-panel-view .panel > .panel-header h3.title {
5+
margin-bottom: 0;
6+
margin-top: 0;
67
}
78

8-
.monaco-shell .screen-reader-detected-explanation .buttons a,
9-
.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink,
10-
.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-button {
11-
max-width: -moz-fit-content;
12-
}
13-
14-
.monaco-workbench > .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit,
15-
.explorer-viewlet .panel-header .count,
16-
.extensions-viewlet > .extensions .extension > .details > .header-container > .header > .version,
17-
.debug-viewlet .debug-call-stack .stack-frame .label {
9+
/* Firefox doesn't seem to support fit-content. */
10+
/* These are the file tabs. */
11+
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit {
1812
min-width: -moz-fit-content;
1913
}
20-
*/
2114
}

0 commit comments

Comments
 (0)