mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-18 04:26:35 +01:00
Fix: Limit global drag-drop to events with files (#4767)
This commit is contained in:
parent
20f27fe32f
commit
4ca1503beb
2 changed files with 12 additions and 5 deletions
|
|
@ -38,8 +38,9 @@ export class FileDropComponent {
|
|||
|
||||
@ViewChild('ngxFileDrop') ngxFileDrop: NgxFileDropComponent
|
||||
|
||||
@HostListener('dragover', ['$event ']) onDragOver(event: DragEvent) {
|
||||
if (!this.dragDropEnabled) return
|
||||
@HostListener('dragover', ['$event']) onDragOver(event: DragEvent) {
|
||||
if (!this.dragDropEnabled || !event.dataTransfer?.types?.includes('Files'))
|
||||
return
|
||||
event.preventDefault()
|
||||
event.stopImmediatePropagation()
|
||||
this.settings.globalDropzoneActive = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue