 		if k is 27 # Escape
 			if this.editing.index?
 				record = this.getMessageDraft(this.editing.id)
-				if this.input.value is record?.original
+
+				# If resetting did nothing then edited message is same as original
+				unless this.resetToDraft this.editing.id
 					this.clearCurrentDraft()
 					this.clearEditing()
-				else
-					this.resetToDraft this.editing.id
 
 				event.preventDefault()
 				event.stopPropagation()

	edit: (element, index) ->
		index = this.getEditingIndex(element) if not index?

		message = this.getMessageOfElement(element)
		hasPermission = RocketChat.authz.hasAtLeastOnePermission('edit-message', message.rid)
		editAllowed = RocketChat.settings.get 'Message_AllowEditing'
		editOwn = message?.u?._id is Meteor.userId()


	recordInputAsDraft: () ->
		id = this.editing.id

		message = this.getMessageById id
		record = this.records[id] || {}
		draft = this.input.value

		if(draft is message.msg)
			this.clearCurrentDraft()
		else
			record.draft = draft
			this.records[id] = record

	getMessageDraft: (id) ->
		return this.records[id]

