Skip to content

Commit 44f0590

Browse files
authored
Fix #2430: Auto-focus text input after clicking clear button (#2431)
1 parent 3491808 commit 44f0590

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

web/common-function.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,10 @@ function selectAll() {
383383
function clearAll() {
384384
if (the.editor) {
385385
the.editor.setValue('');
386+
the.editor.focus();
386387
} else {
387388
$('#source').val('');
389+
$('#source').focus();
388390
}
389391
}
390392

0 commit comments

Comments
 (0)