Skip to content

Commit 7a1342c

Browse files
authored
fix(input): prevent duplicated tabIndex (#12043)
fixes #7178
1 parent 3564bcf commit 7a1342c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/input/input.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,13 @@ export class TextInput extends BaseInput<string> implements IonicFormInput {
312312
// Copy remaining attributes, not handled by ionic/angular
313313
copyInputAttributes(ionInputEle, nativeInputEle);
314314

315+
// prevent having tabIndex duplicated
316+
if (ionInputEle.hasAttribute('tabIndex')) {
317+
ionInputEle.removeAttribute('tabIndex');
318+
}
319+
320+
// handle the autofocus attribute
315321
if (ionInputEle.hasAttribute('autofocus')) {
316-
// the ion-input element has the autofocus attributes
317322
ionInputEle.removeAttribute('autofocus');
318323
switch (this._autoFocusAssist) {
319324
case 'immediate':

0 commit comments

Comments
 (0)