Skip to content

Commit f02d50d

Browse files
committed
Issues-354:
1 parent 276aab4 commit f02d50d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

js/topcodereditor.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,16 @@
510510
editor.codemirror.setValue('');
511511
});
512512

513+
editor.codemirror.on('change', function (cm, event) {
514+
// Key events don't work properly on Android Chrome
515+
if (!cm.state.completionActive /*Enables keyboard navigation in autocomplete list*/) {
516+
if (event.origin == '+input' && event.text && event.text.length > 0 && event.text[0] === '@') {
517+
cm.showHint({ completeSingle: false, alignWithWord: true });
518+
return;
519+
}
520+
}
521+
});
522+
513523
editor.codemirror.on('keydown', function (cm, event) {
514524
if (!cm.state.completionActive /*Enables keyboard navigation in autocomplete list*/) {
515525
if (event.key == '@') {

0 commit comments

Comments
 (0)