You stop editing a cell value when you press (Enter).
To cancel the editing without saving in the document the current changes, you have to press the (Esc) key.