Skip to content

Commit

Permalink
🧹📕changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejpurves committed Jun 11, 2024
1 parent a53ad0f commit 268ebed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/lucky-ligers-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'thebe': patch
---

`Esc` will blur editor, fix to avoid keyboard trap (wcag 2.1.2) @tonyfast
8 changes: 4 additions & 4 deletions packages/thebe/src/codemirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface RequiredCodeMirrorConfig {
extraKeys: {
'Shift-Enter': () => void;
'Ctrl-Space': () => void;
'Esc': () => void;
Esc: () => void;
};
}

Expand Down Expand Up @@ -64,7 +64,7 @@ export function setupCodemirror(
const ref: { cm?: any } = { cm: undefined };

function unFocus() {
ref.cm?.display.input.blur()
ref.cm?.display.input.blur();
}

function codeCompletion() {
Expand Down Expand Up @@ -121,8 +121,8 @@ export function setupCodemirror(
extraKeys: {
'Shift-Enter': execute,
'Ctrl-Space': codeCompletion,
'Esc': unFocus,
},
Esc: unFocus,
},
};

const codeMirrorConfig = Object.assign(
Expand Down

0 comments on commit 268ebed

Please sign in to comment.