better event handling in Slider and Separator