mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Fix: use entire document for dropzone (#7342)
This commit is contained in:
parent
a7536e3ebf
commit
8987cd448f
@ -38,7 +38,7 @@ export class FileDropComponent {
|
||||
|
||||
@ViewChild('ngxFileDrop') ngxFileDrop: NgxFileDropComponent
|
||||
|
||||
@HostListener('dragover', ['$event']) onDragOver(event: DragEvent) {
|
||||
@HostListener('document:dragover', ['$event']) onDragOver(event: DragEvent) {
|
||||
if (!this.dragDropEnabled || !event.dataTransfer?.types?.includes('Files'))
|
||||
return
|
||||
event.preventDefault()
|
||||
@ -53,7 +53,7 @@ export class FileDropComponent {
|
||||
clearTimeout(this.fileLeaveTimeoutID)
|
||||
}
|
||||
|
||||
@HostListener('dragleave', ['$event']) public onDragLeave(
|
||||
@HostListener('document:dragleave', ['$event']) public onDragLeave(
|
||||
event: DragEvent,
|
||||
immediate: boolean = false
|
||||
) {
|
||||
@ -73,7 +73,7 @@ export class FileDropComponent {
|
||||
}, ms)
|
||||
}
|
||||
|
||||
@HostListener('drop', ['$event']) public onDrop(event: DragEvent) {
|
||||
@HostListener('document:drop', ['$event']) public onDrop(event: DragEvent) {
|
||||
if (!this.dragDropEnabled) return
|
||||
event.preventDefault()
|
||||
event.stopImmediatePropagation()
|
||||
|
Loading…
x
Reference in New Issue
Block a user