From 776afbdef6452a892e680fa348cccbbe9f475aa4 Mon Sep 17 00:00:00 2001 From: Manuel Mtz-Almeida Date: Wed, 14 Jun 2017 23:59:21 +0200 Subject: [PATCH] fix(input): prevent duplicated tabIndex fixes #7178 --- src/components/input/input.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/input/input.ts b/src/components/input/input.ts index f8ac113cdcc..d0e364edc87 100644 --- a/src/components/input/input.ts +++ b/src/components/input/input.ts @@ -312,8 +312,13 @@ export class TextInput extends BaseInput implements IonicFormInput { // Copy remaining attributes, not handled by ionic/angular copyInputAttributes(ionInputEle, nativeInputEle); + // prevent having tabIndex duplicated + if (ionInputEle.hasAttribute('tabIndex')) { + ionInputEle.removeAttribute('tabIndex'); + } + + // handle the autofocus attribute if (ionInputEle.hasAttribute('autofocus')) { - // the ion-input element has the autofocus attributes ionInputEle.removeAttribute('autofocus'); switch (this._autoFocusAssist) { case 'immediate':