From bfb1157687c265b1d447f3ebc0ba16172b19fae3 Mon Sep 17 00:00:00 2001 From: Lias Kleisa Date: Fri, 24 May 2024 13:46:58 +0200 Subject: [PATCH] Add scrollLeft on input leave and adjust padding --- .../dialog/objective-dialog/objective-form.component.html | 1 + .../dialog/objective-dialog/objective-form.component.scss | 2 +- .../dialog/objective-dialog/objective-form.component.ts | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.html b/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.html index 612e3cdefd..b9bdf5d247 100644 --- a/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.html +++ b/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.html @@ -78,6 +78,7 @@ [matAutocomplete]="auto" (input)="filter()" (focus)="filter(); input.select()" + (focusout)="scrollLeft()" [value]="displayedValue" /> diff --git a/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.scss b/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.scss index f81849ff44..d5d63bee0a 100644 --- a/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.scss +++ b/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.scss @@ -39,7 +39,7 @@ .alignment-input { border: solid 1px #909090; - padding: 0.44rem 0.625rem 0.375rem 0.625rem; + padding: 0.44rem 0.625rem 0.375rem 0.625rem !important; cursor: pointer; height: 1.18rem; box-sizing: content-box; diff --git a/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.ts b/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.ts index f288f70821..bf218b4625 100644 --- a/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.ts +++ b/frontend/src/app/shared/dialog/objective-dialog/objective-form.component.ts @@ -360,5 +360,9 @@ export class ObjectiveFormComponent implements OnInit { } } + scrollLeft() { + this.input.nativeElement.scrollLeft = 0; + } + protected readonly getQuarterLabel = getQuarterLabel; }