Skip to content

Commit 483d703

Browse files
committed
Fix/editor is a focus trap
1 parent 9bc4286 commit 483d703

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)