1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00:00

[PM-14345] Enabling drag and drop for cipher fields (#12067)

* enabling drag and drop for cipher fields

* adding drag and drop to totp and fido

* removing code changes to wrong file

* undoing uneeded change

* Changes suggested by Shane

* fixes

* fixes

* moving export to the correct spot

---------

Co-authored-by: --global <>
This commit is contained in:
cd-bitwarden
2024-12-10 12:55:02 -05:00
committed by GitHub
parent 4003d30b46
commit 83dc66dd56
8 changed files with 105 additions and 30 deletions

View File

@@ -0,0 +1,22 @@
import { Directive, HostListener, Input } from "@angular/core";
@Directive({
selector: "[appTextDrag]",
standalone: true,
host: {
draggable: "true",
class: "tw-cursor-move",
},
})
export class TextDragDirective {
@Input({
alias: "appTextDrag",
required: true,
})
data = "";
@HostListener("dragstart", ["$event"])
onDragStart(event: DragEvent) {
event.dataTransfer.setData("text", this.data);
}
}