Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

fix(frontend): prevent Chromium caret loss during file rename

johavenf99b31300334
diff --git a/frontend/src/app/common/directives/input-edit.directive.ts b/frontend/src/app/common/directives/input-edit.directive.ts
index c6df44f4..c766e9f0 100644
--- a/frontend/src/app/common/directives/input-edit.directive.ts
+++ b/frontend/src/app/common/directives/input-edit.directive.ts
@@ -55,6 +55,12 @@ export class InputEditDirective implements OnInit {
}
}
+ @HostListener('pointerdown', ['$event'])
+ stopPointerEvent(ev: Event) {
+ // Prevent parent tap/drag handlers from stealing Chromium's text caret.
+ ev.stopPropagation()
+ }
+
private initStyles() {
this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'inline')
this.renderer.setStyle(this.elementRef.nativeElement, 'height', '100%')