Retain cursor position after value change.