Fix Cannot read properties of undefined (reading '0') when the mouse moves to x=0 while dragging a rangeslider [#6780]