Skip to content

Commit

Permalink
Accessibility: allow escaping code editors by pressing Esc
Browse files Browse the repository at this point in the history
See ajaxorg/ace#5114

When the text cursor is in the editor, the user can now press the Esc
key to exit the editor. Pressing the Enter key when the focus ring is
visible around the editor will enter the editor again.
  • Loading branch information
generalmimon committed Oct 6, 2024
1 parent 83b9689 commit c9a8505
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"doc": "docs"
},
"dependencies": {
"ace-builds": "^1.4.12",
"ace-builds": "^1.17.0",
"big-integer": "^1.6.25",
"bootstrap": "^3.4.1",
"bootswatch": "^3.3.7",
Expand Down
1 change: 1 addition & 0 deletions src/v1/app.layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class LayoutManager<T> {
editor.getSession().setMode(`ace/mode/${lang}`);
if (lang === "yaml")
editor.setOption("tabSize", 2);
editor.setOption("enableKeyboardAccessibility", true);
editor.$blockScrolling = Infinity; // TODO: remove this line after they fix ACE not to throw warning to the console
editor.setReadOnly(isReadOnly);
if (callback)
Expand Down

0 comments on commit c9a8505

Please sign in to comment.