Prevent droping onto files

Hi, how can I prevent from dropping onto files (eg. images)?

https://snippet.webix.com/ax8l48z4
I added a onBeforeDragIn and a onBeforeDrop, expecting to capture the target so I could prevent the drop if the target is not a folder.
However, these functions return no target:

{ fragile: undefined from: u {$ready: Array(4), config: {…}, B: {…}, h: {…}, o: {…}, …} index: 7 source: ["/yiyui"] start: "/yiyui" target: null to: null x_offset: -20 y_offset: -10 }

According to documentation, there events shoudl return target and to:
https://docs.webix.com/api__ui.filemanager_onbeforedragin_event.html

Thanks

Hello @Miguel, you actually can access the target from within that context if you specifically reference the target object: https://snippet.webix.com/nv3vrcqj.

sorry did not mention that I’m in files mode
https://snippet.webix.com/pk0bk77g

In this case is there a way to access it?

Thanks

The principle stays the same, but since the structure is a bit different, you will need to refer to the context.target in this mode: https://snippet.webix.com/g9zp2aiy.

If you were to use more than a single mode, you could implement a check for the current mode and change your behaviour accordingly - https://snippet.webix.com/26gs3odr.