when i use drag n drop in uploader component everything works fine but the images open in new tab how to prevent this behavior
Hello, @romain
You can achieve desired behavior with the help of addDropZone method, which adds an uploader drop zone to any HTML element of the page.
Please, check the snippet here: Code Snippet
yes i have dropZone but when after drag the image the browser open new tab. The image upload and working fine. Problem only that i have to close new tab
Could you, please, provide a snippet with the issue.
The thing is that the image is opening on the new tab when it is put out of the DropZone
Please, check an example here: Code Snippet
the issue work maybe some problem with my browser which open each new image in new tab. Is there exist some action which make prevent default behavior when drag image to dragZone ?
Hello, @roma
There is an onBeforeFileDrop event of DragItem
mixin. And then, use preventEvent to stop the event.
Please, check the snippet here: Code Snippet
Great it works! Thanks for your help!!!