Skip to content

Commit 69cf40b

Browse files
committed
Update codeit.js
1 parent 653cef3 commit 69cf40b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/codeit.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,19 +375,21 @@ class CodeitElement extends HTMLElement {
375375
overrideDeleteText(event);
376376

377377
});
378+
378379

379380
cd.on('keyup', (event) => {
380381

381382
if (shouldRecord(event) && recording) {
382-
383-
onNextFrame(recordHistory);
384383
recording = false;
385-
386384
}
387385

388386
});
387+
388+
cd.on('type', () => {
389+
recordHistory();
390+
});
391+
389392

390-
391393
cd.on('keydown mousedown mouseup touchstart touchend focus blur',
392394
() => { onNextFrame(checkCaretPosEvent) }, false);
393395

0 commit comments

Comments
 (0)