fix(input): copy custom attrs from ion-input to native input

This commit is contained in:
Adam Bradley
2016-02-01 21:57:26 -06:00
parent 015361d5c0
commit 4cfe210a5a
4 changed files with 31 additions and 3 deletions

View File

@ -8,7 +8,7 @@ import {Item} from '../item/item';
import {IonicApp} from '../app/app';
import {isTrueProperty} from '../../util/util';
import {Label} from '../label/label';
import {pointerCoord, hasPointerMoved, closest} from '../../util/dom';
import {pointerCoord, hasPointerMoved, closest, copyInputAttributes} from '../../util/dom';
import {NavController} from '../nav/nav-controller';
import {NativeInput, NextInput} from './native-input';
import {Platform} from '../../platform/platform';
@ -132,7 +132,7 @@ export class InputBase {
if (val) {
val = val.toLowerCase();
if (/password|email|number|search|tel|url|date|datetime|datetime-local|month|time|week/.test(val)) {
if (/password|email|number|search|tel|url|date|month|time|week/.test(val)) {
this._type = val;
}
}
@ -175,6 +175,9 @@ export class InputBase {
this.checkHasValue(nativeInput.getValue());
this.disabled = this._disabled;
// copy ion-input attributes to the native input element
copyInputAttributes(this._elementRef.nativeElement, nativeInput.element());
}
/**