Skip to content

Commit f946073

Browse files
authored
Merge pull request #3114 from Chaitanya1672/fixes/editor-is-a-focus-trap
Fix/editor is a focus trap
2 parents e495559 + 1166650 commit f946073

File tree

1 file changed

+4
-0
lines changed
  • client/modules/IDE/components/Editor

1 file changed

+4
-0
lines changed

client/modules/IDE/components/Editor/index.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ class Editor extends React.Component {
208208
if (/^[a-z]$/i.test(e.key) && (mode === 'css' || mode === 'javascript')) {
209209
this.showHint(_cm);
210210
}
211+
if (e.key === 'Escape') {
212+
e.preventDefault();
213+
this._cm.getInputField().blur();
214+
}
211215
});
212216

213217
this._cm.getWrapperElement().style[

0 commit comments

Comments
 (0)