Fix #940 by updating the div spin boxes when needed