Moved edit_mode canceling logic back into cell.