I have an Angular2 Material mdInput field, and for some reason the placeholder text doesn't go away and the input text area doesn't focus when clicking into it.
<form class="create-taskitem-form" (ngSubmit)="submitNewTask()" novalidate>
<md-input-container class="create-task-item">
<input mdInput
[(ngModel)]="taskListTitle"
(keyup.escape)="clearNewTask()"
name="taskListTitle"
autocomplete="off"
[placeholder]="newItemPlaceholder"
type="text">
</md-input-container>
</form>
When it doesn't work, placeholder doesn't disappear and field doesn't focus but I can type into it:
And what's strange is that once I resize the browser, it does work and snaps into the correct focus state:
What's also strange is that I have a nested child component where it works just fine. Here's the root module for them:
import 'hammerjs';
@NgModule({
imports: [
CommonModule,
TasksRoutingModule,
ContentEditableModule,
ReactiveFormsModule,
FormsModule,
MaterialModule
],
exports: [
TasksRoutingModule
],
providers: [
TasklistTypes
],
declarations: [TasklistCollectionComponent, TasklistComponent, TaskItemComponent]
})
export class TasksModule { }