1 person found this helpful
You might need to call event.preventDefault in your handlers.
Thanks for the reply! I think I've actually found the problem. I don't know if it's a bug or if it's a problem with my code. Here's a little background on my setup and the issue I've found -
I have a custom list component named "ExList". The only reason for this custom component is so I can define custom styles. I wasn't able to find out if I could define custom style on skins so I just went with the custom component approach. This list is used to display some images in a TileLayout. I need to be able to drag items from another list of mine into this list.
This "ExList" has a custom skin. Within this Skin I do exactly what the default Spark skin does - I create a scroller with the id of "scroller" and I create a dataGroup with the id of "dataGroup". This is where the problem lies.
When I drag the item over my list, I get the correct green "+" arrow for the first 4 pixles of the control and then nothing. The "scroller" is inset 4 pixles on my skin. My best guess here is the Scroller within the Skin is being treated as a separate component instead of just part of the main container (parent) component for drag/drop operations.
I was able to work around this issue by listening for the dragEnter and dragDrop events on the 'scroller' component. It works for now, but it's not the most ideal solution.
Are you saying that preventDefault did not work?
Sorry! yes, I am. When I realized that event.preventDefault() didn't work either it prompted me to look in other areas - like the Skin