Docs.
Don't strip zeroes if editing and there is a decimal separator.
Don't also delete the decimal separator when deleting the last fractional part.