Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Fix input box focus state #227

Merged
merged 2 commits into from
Dec 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/app/public/modules/input-box/input-box.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
ChangeDetectorRef,
Component,
ContentChild,
Input,
Expand Down Expand Up @@ -92,6 +93,7 @@ export class SkyInputBoxComponent implements OnInit {

constructor(
@Optional() public themeSvc: SkyThemeService,
private changeRef: ChangeDetectorRef,
private inputBoxHostSvc: SkyInputBoxHostService
) { }

Expand Down Expand Up @@ -120,6 +122,7 @@ export class SkyInputBoxComponent implements OnInit {
// initial change detection. Using `setTimeout()` here fixes it.
setTimeout(() => {
this.formControlHasFocus = hasFocus;
this.changeRef.markForCheck();
});
}

Expand Down