Merge branch 'RED-10512' into 'master'

RED-10512: fixed file attribute text selection.

See merge request redactmanager/red-ui!750
This commit is contained in:
Dan Percic 2024-12-09 10:27:29 +01:00
commit 4206993c72

View File

@ -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 { Component, computed, effect, HostListener, input, Input, OnDestroy } from '@angular/core';
import { AbstractControl, FormBuilder, FormsModule, ReactiveFormsModule, UntypedFormGroup, ValidatorFn } from '@angular/forms'; import { AbstractControl, FormBuilder, FormsModule, ReactiveFormsModule, UntypedFormGroup, ValidatorFn } from '@angular/forms';
import { MatIconModule } from '@angular/material/icon'; import { MatIconModule } from '@angular/material/icon';
@ -41,7 +41,6 @@ import { ConfigService } from '../../config.service';
ReactiveFormsModule, ReactiveFormsModule,
DynamicInputComponent, DynamicInputComponent,
CircleButtonComponent, CircleButtonComponent,
NgTemplateOutlet,
TranslateModule, TranslateModule,
StopPropagationDirective, StopPropagationDirective,
], ],
@ -90,14 +89,11 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
); );
this.#subscriptions.add(sub2.subscribe()); this.#subscriptions.add(sub2.subscribe());
effect( effect(() => {
() => { if (this.#shouldClose()) {
if (this.#shouldClose()) { this.close();
this.close(); }
} });
},
{ allowSignalWrites: true },
);
} }
get isDate(): boolean { get isDate(): boolean {
@ -131,7 +127,6 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
handleClick($event: MouseEvent) { handleClick($event: MouseEvent) {
$event.stopPropagation(); $event.stopPropagation();
$event.preventDefault();
} }
ngOnDestroy() { ngOnDestroy() {