Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hediet committed Dec 5, 2023
1 parent d70a46b commit 58a122e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
11 changes: 0 additions & 11 deletions src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,6 @@ export class AccessibleDiffViewerPrev extends Action2 {
export function findFocusedDiffEditor(accessor: ServicesAccessor): IDiffEditor | null {
const codeEditorService = accessor.get(ICodeEditorService);
const diffEditors = codeEditorService.listDiffEditors();
const activeCodeEditor = codeEditorService.getFocusedCodeEditor() ?? codeEditorService.getActiveCodeEditor();
if (!activeCodeEditor) {
return null;
}

for (let i = 0, len = diffEditors.length; i < len; i++) {
const diffEditor = <IDiffEditor>diffEditors[i];
if (diffEditor.getModifiedEditor().getId() === activeCodeEditor.getId() || diffEditor.getOriginalEditor().getId() === activeCodeEditor.getId()) {
return diffEditor;
}
}

const activeElement = getActiveElement();
if (activeElement) {
Expand Down
23 changes: 14 additions & 9 deletions src/vs/editor/standalone/browser/standalone-tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@
clip-path: inset(50%);
}

/*.monaco-editor.vs [tabindex="0"]:focus {
outline: 1px solid rgba(0, 122, 204, 0.4);
.monaco-editor, .monaco-diff-editor .synthetic-focus,

This comment has been minimized.

Copy link
@scebotari66

scebotari66 Mar 1, 2024

@hediet it seems to me this is a typo; it should be .monaco-editor .monaco-diff-editor .synthetic-focus (without comma after .monaco-editor). The same issue in the following lines

This comment has been minimized.

Copy link
@KurtGokhan

KurtGokhan Mar 14, 2024

I noticed this too. Any plans to fix this @hediet?

This comment has been minimized.

Copy link
@hediet

hediet Mar 14, 2024

Author Member

Can you create an issue and file a PR? :)

This comment has been minimized.

Copy link
@KurtGokhan

KurtGokhan Apr 2, 2024

Attempted a fix here

.monaco-editor, .monaco-diff-editor [tabindex="0"]:focus,
.monaco-editor, .monaco-diff-editor [tabindex="-1"]:focus,
.monaco-editor, .monaco-diff-editor button:focus,
.monaco-editor, .monaco-diff-editor input[type=button]:focus,
.monaco-editor, .monaco-diff-editor input[type=checkbox]:focus,
.monaco-editor, .monaco-diff-editor input[type=search]:focus,
.monaco-editor, .monaco-diff-editor input[type=text]:focus,
.monaco-editor, .monaco-diff-editor select:focus,
.monaco-editor, .monaco-diff-editor textarea:focus {
outline-width: 1px;
outline-style: solid;
outline-offset: -1px;
opacity: 1 !important;
outline-color: var(--vscode-focusBorder);
opacity: 1
}
.monaco-editor.vs-dark [tabindex="0"]:focus {
outline: 1px solid rgba(14, 99, 156, 0.6);
outline-offset: -1px;
opacity: 1 !important;
}*/

0 comments on commit 58a122e

Please sign in to comment.