Skip to content

Commit

Permalink
fixed excess length for onPaste (#16779)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark7p authored Nov 21, 2024
1 parent a2075bb commit d6112fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/inputotp/inputotp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ export class InputOtp implements AfterContentInit {
let paste = event.clipboardData.getData('text');

if (paste.length) {
let pastedCode = paste.substring(0, this.length + 1);

let pastedCode = paste.substring(0, this.length);
if (!this.integerOnly || !isNaN(pastedCode)) {
this.tokens = pastedCode.split('');
this.updateModel(event);
Expand Down

0 comments on commit d6112fc

Please sign in to comment.