No Slider::sendDragEnd when disabled during mouse drag


#1

If a Slider control is disabled during a mouse drag, then sendDragEnd() is not called. If a slider listener is doing things in response to sliderDragStarted and sliderDragEnded, then this can result in an imbalanced state where the start notification is received but no matching end notification is received. Slider should remember that a drag notification was sent during its mouseDown method and then close the loop by doing a sendDragEnd() call during mouseUp, even if isEnabled() is false, in the case where sendDragStart() had occurred for mouseDown. Or it should close this loop during an enablementChanged() implementation. But one way or the other, it should be balanced out.
This also applied to the reserve (slider was disabled upon mouseDown but then enabled before mouseUp).
This issue may apply to other widgets as well, but I caught it in Slider.


#2

Thanks - try it now.


#3

Solved it, great! Thank you for the quick solution.