diff --git a/IPython/html/widgets/widget_float.py b/IPython/html/widgets/widget_float.py
index 31ec6d1..cc55d9d 100644
--- a/IPython/html/widgets/widget_float.py
+++ b/IPython/html/widgets/widget_float.py
@@ -78,9 +78,11 @@ class _BoundedFloatRangeWidget(_FloatRangeWidget):
"""Validate min <= low <= high <= max"""
if name == "value":
low, high = new
- low = max(low, self.min)
- high = min(high, self.max)
- self.value = (min(low, high), max(low, high))
+ else:
+ low, high = self.value
+ low = max(low, self.min)
+ high = min(high, self.max)
+ self.value = (min(low, high), max(low, high))
class FloatRangeSliderWidget(_BoundedFloatRangeWidget):
diff --git a/IPython/html/widgets/widget_int.py b/IPython/html/widgets/widget_int.py
index 824e28a..ec8648f 100644
--- a/IPython/html/widgets/widget_int.py
+++ b/IPython/html/widgets/widget_int.py
@@ -77,9 +77,11 @@ class _BoundedIntRangeWidget(_IntRangeWidget):
"""Validate min <= low <= high <= max"""
if name == "value":
low, high = new
- low = max(low, self.min)
- high = min(high, self.max)
- self.value = (min(low, high), max(low, high))
+ else:
+ low, high = self.value
+ low = max(low, self.min)
+ high = min(high, self.max)
+ self.value = (min(low, high), max(low, high))
class IntRangeSliderWidget(_BoundedIntRangeWidget):