Prevent range slider from resetting if user clears input

I have a range slider with input boxes. So far I have it mostly working but I need the thumb sliders to not reset in the middle if the user clears the input from the boxes. If a user clears the input I want the slider to stay at their current position.

Sliders reset in the middle if user clears and input

Slider reset

Slider reset max value

Here is the CodeSandbox