User defined drag - page background goes black

Hi,



Using your code sample:



//user defined drag and drop control with event handlers inside

function s_control(){ …





When I drag from the tree (IE7), the background of the tree control goes black, and as I head across the page, other controls will also go black. And I cannot drop into the targetObj (a div in this case).



It seems to happen randomly, perhaps 1 in 5 times. Rest of time all is perfect.



It almost seems like this “black” drag is trying to select those elements under the mouse cursor, rather than just drag over them. So its like a multiselect - which would I guess make the objects selected black.



I could email you code if you need, but I guess you have come across this and the solution is a simple return true; somewhere !!



I hope this is understandable.



Thanks.







So its like a multiselect - which would I guess make the objects selected black.

Most possible it is default IE selecting behavior. IE detects drag start and recognize it as start of selection, by default such behavior denied inside component - but elements outside of it can be affected.
You can fully disabled selection on your page ( in case of IE ) by

    document.body.onselectstart=function(){ return false; }

( this code will not harm  FF so can be used with any browser )

Yes, that solved it.

Thank you.