Skip to content

Commit c98a49b

Browse files
committed
fix(input-otp): remove maxlength to work with autofill from sms
1 parent 2a337e4 commit c98a49b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

core/src/components/input-otp/input-otp.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,6 @@ export class InputOTP implements ComponentInterface {
774774
type="text"
775775
autoCapitalize={autocapitalize}
776776
inputmode={inputmode}
777-
maxLength={1}
778777
pattern={pattern}
779778
disabled={disabled}
780779
readOnly={readonly}

core/src/components/input-otp/test/basic/input-otp.e2e.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,10 @@ configs({ modes: ['ios'] }).forEach(({ title, config }) => {
344344
const firstInput = page.locator('ion-input-otp input').first();
345345
await firstInput.focus();
346346

347-
await page.keyboard.type('أبجد123');
347+
// We need to type the numbers separately because the browser
348+
// does not properly handle the script text when mixed with numbers
349+
await page.keyboard.type('123');
350+
await page.keyboard.type('أبجد');
348351

349352
// Because Arabic is a right-to-left script, JavaScript's handling of RTL text
350353
// causes the array values to be reversed while input boxes maintain LTR order.

0 commit comments

Comments
 (0)