Skip to content

Commit c9a8505

Browse files
committed
Accessibility: allow escaping code editors by pressing Esc
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.
1 parent 83b9689 commit c9a8505

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package-lock.json

+5-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"doc": "docs"
66
},
77
"dependencies": {
8-
"ace-builds": "^1.4.12",
8+
"ace-builds": "^1.17.0",
99
"big-integer": "^1.6.25",
1010
"bootstrap": "^3.4.1",
1111
"bootswatch": "^3.3.7",

src/v1/app.layout.ts

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export class LayoutManager<T> {
6060
editor.getSession().setMode(`ace/mode/${lang}`);
6161
if (lang === "yaml")
6262
editor.setOption("tabSize", 2);
63+
editor.setOption("enableKeyboardAccessibility", true);
6364
editor.$blockScrolling = Infinity; // TODO: remove this line after they fix ACE not to throw warning to the console
6465
editor.setReadOnly(isReadOnly);
6566
if (callback)

0 commit comments

Comments
 (0)