Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allowFileDrop functionality to dnd-sortable-container #271

Open
DzmVasileusky opened this issue Jul 27, 2018 · 1 comment
Open

Add allowFileDrop functionality to dnd-sortable-container #271

DzmVasileusky opened this issue Jul 27, 2018 · 1 comment

Comments

@DzmVasileusky
Copy link

  • I'm submitting a ...
    [x] feature request

  • What is the current behavior?
    Currently all directives which extend AbstractComponent bind handlers to 'drop' event.
    And inside handler there is event.stopPropagation call which prevents bubbling.
    It breaks integration with packages like ng2-file-upload which also have subscription to 'drop' event.
    I want to use drag and drop only to sort HTMLElements but it also handles all the file drops.
    dnd-sortable-container has no allowDrop binding so I can't switch off stopPropagation method.

  • What is the expected behavior?
    allowDrop is working for dnd-sortable-container and disable drop or allowFileDrop for all the directives to disable file drop handling

@Chealer
Copy link

Chealer commented Aug 10, 2021

I do not consider this as a feature request, but as a bug. We have a similar issue reported against our application, also based on both ng2-dnd (2.2.1) and ng2-file-upload (1.3.0).

Which version are you experiencing this with? In our case, file drops remain possible, but some are impossible. Specifically, files from Chromium's Downloads (recent downloads) cannot be dragged to an ng2FileDrop inside a dnd-sortable-container. Files from other sources (for example, from the desktop) can be. Even files from Firefox's Downloads can be dragged to a Chrome tab using dnd-sortable-container. This affects presumably all browsers based on Blink, including Google Chrome 92.0.4515.131 and Microsoft Edge 92.0.902.67. The problem is not just the drop event's handling. Currently, when hovering the container, the cursor becomes a black standard prohibited sign (in not-allowed's style). Our records suggests this wasn't the case before (perhaps with prior Blink versions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants