Home > Blockchain >  The input element's type ('email') does not support selection, Ionic v6
The input element's type ('email') does not support selection, Ionic v6

Time:02-12

i have this error that triggers as soon as there is a change in my ion-input.

I can change the type with 'text' to fix the problem but then the autocomplete email is not functional.

Thank you for your answers !

Error:

index-06cd27b1.js:1986 DOMException: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('email') does not support selection.
    at Input.valueChanged (http://localhost:4200/node_modules_ionic_core_dist_esm_ion-input_entry_js.js:236:24)

Code :

     <ion-item>
            <ion-label position="floating">
              <ion-icon name="mail-outline"></ion-icon>
              Your email</ion-label
            >
            <ion-input
              type="email"
              autocomplete="email"
              placeholder="[email protected]"
              [formControlName]="'email'"
            >
            </ion-input>
          </ion-item>

Version: "@ionic/angular": "6.0.7", Angular : "^13.1.4"

CodePudding user response:

I had the same issue starting today: @ionic/[email protected], [email protected].

This is a known bug, you can check out the issue here. As stated in the thread, there's a dev version of the package you can use as a temp fix before 6.0.8 is released. It worked perfectly for me.

@ionic/[email protected]
  • Related