We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c7d835e + 1e2e4a4 commit d165d63Copy full SHA for d165d63
client/modules/IDE/components/Editor/index.jsx
@@ -211,7 +211,15 @@ class Editor extends React.Component {
211
}
212
if (e.key === 'Escape') {
213
e.preventDefault();
214
- this._cm.getInputField().blur();
+ const selections = this._cm.listSelections();
215
+
216
+ if (selections.length > 1) {
217
+ const firstPos = selections[0].head || selections[0].anchor;
218
+ this._cm.setSelection(firstPos);
219
+ this._cm.scrollIntoView(firstPos);
220
+ } else {
221
+ this._cm.getInputField().blur();
222
+ }
223
224
});
225
0 commit comments