Skip to content

Commit

Permalink
fix(textarea): apply classes properly
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jun 13, 2017
1 parent 9f86e10 commit dc958c3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/input/input.ts
Expand Up @@ -104,6 +104,7 @@ import { Platform } from '../../platform/platform';
'[readonly]="_readonly">' +

'<textarea #textInput *ngIf="_isTextarea" class="text-input" ' +
'[ngClass]="\'text-input-\' + _mode"' +
'(input)="onInput($event)" ' +
'(blur)="onBlur($event)" ' +
'(focus)="onFocus($event)" ' +
Expand Down Expand Up @@ -258,15 +259,17 @@ export class TextInput extends BaseInput<string> implements IonicFormInput {
@Optional() public ngControl: NgControl,
private _dom: DomController
) {
super(config, elementRef, renderer,
elementRef.nativeElement.tagName === 'ION-TEXTAREA' ? 'textarea' : 'input', '', form, item, ngControl);
super(config, elementRef, renderer, 'input', '', form, item, ngControl);

this.autocomplete = config.get('autocomplete', 'off');
this.autocorrect = config.get('autocorrect', 'off');
this._autoFocusAssist = config.get('autoFocusAssist', 'delay');
this._keyboardHeight = config.getNumber('keyboardHeight');
this._isTextarea = !!(elementRef.nativeElement.tagName === 'ION-TEXTAREA');

if (this._isTextarea && item) {
item.setElementClass('item-textarea', true);
}
// If not inside content, let's disable all the hacks
if (!_content) {
return;
Expand Down

0 comments on commit dc958c3

Please sign in to comment.