added edit reverting when hitting escape key