Skip to content

Commit 1b1c5c0

Browse files
committed
add tab to p5 link
1 parent 2fc7ad5 commit 1b1c5c0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

client/modules/IDE/components/Editor.jsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,19 @@ class Editor extends React.Component {
347347
showHint(_cm) {
348348
const hintOptions = {
349349
_fontSize: this.props.fontSize,
350-
completeSingle: false
350+
completeSingle: false,
351+
extraKeys: {
352+
Tab: (cm, e) => {
353+
const activeItem = document.querySelector(
354+
`.CodeMirror-hint-active a`
355+
);
356+
if (activeItem) {
357+
activeItem.click();
358+
} else {
359+
e.pick();
360+
}
361+
}
362+
}
351363
// completeOnSingleClick: false,
352364
// closeOnUnfocus: false,
353365
// closeOnPick: false

0 commit comments

Comments
 (0)