Skip to content

Commit 07bbf69

Browse files
author
Bot
committed
fix pause on escape
1 parent 7cad54d commit 07bbf69

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/CodeEditor.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ export default {
391391
392392
if (ev.key === 'Escape' || ev.key === 'Pause') {
393393
this.popUp(true, 'Resume');
394+
clearInterval(this.liveWpmInterval);
395+
this.liveWpmInterval = null;
396+
if (this.stats.firstCharTime) {
397+
this.pauseStart = Date.now();
398+
}
399+
this.$emit('pause', true);
394400
} else if (ev.key === 'Enter') {
395401
handleEnter();
396402
} else if (ev.key === 'Backspace') {

0 commit comments

Comments
 (0)