Skip to content

Commit

Permalink
fix: only reset on full match
Browse files Browse the repository at this point in the history
  • Loading branch information
gera2ld committed Mar 8, 2024
1 parent a3a957c commit ac3bf1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,10 @@ export class KeyboardService {
caseSensitive: false,
}),
];
if (this._handleKeyOnce(keyExps, false)) {
const state = this._handleKeyOnce(keyExps, false);
if (state) {
e.preventDefault();
this._reset();
if (state === 2) this._reset();
}
this._timer = window.setTimeout(this._reset, this.options.sequenceTimeout);
};
Expand Down

0 comments on commit ac3bf1b

Please sign in to comment.