From 56bdf1bc4d74c6dd1124684c8db3a3e8f8ee957b Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Sat, 7 Dec 2024 11:59:51 +0200 Subject: [PATCH] RED-10512: fixed file attribute text selection. --- .../file-attribute/file-attribute.component.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.ts b/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.ts index ba483791b..0120ff96e 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.ts +++ b/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.ts @@ -1,4 +1,4 @@ -import { AsyncPipe, NgClass, NgIf, NgTemplateOutlet } from '@angular/common'; +import { AsyncPipe, NgClass, NgIf } from '@angular/common'; import { Component, computed, effect, HostListener, input, Input, OnDestroy } from '@angular/core'; import { AbstractControl, FormBuilder, FormsModule, ReactiveFormsModule, UntypedFormGroup, ValidatorFn } from '@angular/forms'; import { MatIconModule } from '@angular/material/icon'; @@ -41,7 +41,6 @@ import { ConfigService } from '../../config.service'; ReactiveFormsModule, DynamicInputComponent, CircleButtonComponent, - NgTemplateOutlet, TranslateModule, StopPropagationDirective, ], @@ -90,14 +89,11 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr ); this.#subscriptions.add(sub2.subscribe()); - effect( - () => { - if (this.#shouldClose()) { - this.close(); - } - }, - { allowSignalWrites: true }, - ); + effect(() => { + if (this.#shouldClose()) { + this.close(); + } + }); } get isDate(): boolean { @@ -131,7 +127,6 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr handleClick($event: MouseEvent) { $event.stopPropagation(); - $event.preventDefault(); } ngOnDestroy() {