mouseUp not called when clicking the second time on a Slider with a Label on top of it

Hello!

I created a rectangle Slider with a value label on top of it (using LookAndFeel_V4; the labels’s text box is the same size as the slider).

If I click once on the slider, the mouseDown() and then mouseUp() methods are called and the text editor (for the value of the slider) gets activated, which is ok, BUT if I don’t write a new value in the text box and just click once again on the slider, mouseDown is again called, which calls sendDragStart(), even though I am not actually dragging and there is no mouseUp call afterwards, which means dragging is in progress even if I am not dragging.

Is there a way of fixing this? I wanted to check if the text editor of the label is opened or not, but I don’t have access to label::isBeingEdited() from LookAndFeel_V4.

Thanks!
Screenshot 2022-12-07 at 17.47.31
Screenshot 2022-12-07 at 17.47.36