IE scrollbar drag and drop bug
Posted on 2006-07-13
I have a floating div with a onmousedown function to move it. the function sets simpy a var grabbed = true, on mouseup I set grabbed = false. Then I do simply a window.onmousemove and if grabbed is true, then I move the div to follow the pointer. Now the trouble arises if I have a scrollbar on my floating div, if I click on the bar, the onmousedown is executed (thus grabbing the div) but the mouseup is never executed, then the div is never released... the div looks like this :
<div onmousedown='grabit()' onmouseup='releaseit()' id='thediv' style='overflow:auto;height:100'>
Under firefox it works fine, the bug arises only under IE. How could I arrange this ?