fix ping-pong effect when editing todo