Skip to content

Commit

Permalink
fix(input): prevent duplicated tabIndex (#12043)
Browse files Browse the repository at this point in the history
fixes #7178
  • Loading branch information
manucorporat authored Jun 15, 2017
1 parent 3564bcf commit 7a1342c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/input/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,13 @@ export class TextInput extends BaseInput<string> 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':
Expand Down

0 comments on commit 7a1342c

Please sign in to comment.