fix(text-inputs): fix text inputs not wrapped by ion-input

This commit is contained in:
Adam Bradley
2015-11-28 21:08:55 -06:00
parent fac40923c1
commit c420c0d726
2 changed files with 14 additions and 6 deletions

View File

@ -78,6 +78,10 @@
</ion-list> </ion-list>
<div>
<textarea></textarea>
</div>
</form> </form>
</ion-content> </ion-content>

View File

@ -402,8 +402,8 @@ export class TextInput {
selector: 'textarea,input[type=text],input[type=password],input[type=number],input[type=search],input[type=email],input[type=url],input[type=tel]', selector: 'textarea,input[type=text],input[type=password],input[type=number],input[type=search],input[type=email],input[type=url],input[type=tel]',
inputs: ['value'], inputs: ['value'],
host: { host: {
'(focus)': 'wrapper.focusChange(true)', '(focus)': 'focusChange(true)',
'(blur)': 'wrapper.focusChange(false)', '(blur)': 'focusChange(false)',
'(keyup)': 'onKeyup($event)' '(keyup)': 'onKeyup($event)'
} }
}) })
@ -428,12 +428,16 @@ export class TextInputElement {
} }
} }
onKeyup(ev) { onInit() {
this.wrapper.hasValue(ev.target.value); this.wrapper && this.wrapper.hasValue(this.value);
} }
onInit() { focusChange(changed) {
this.wrapper.hasValue(this.value); this.wrapper && this.wrapper.focusChange(changed);
}
onKeyup(ev) {
this.wrapper && this.wrapper.hasValue(ev.target.value);
} }
labelledBy(val) { labelledBy(val) {