This jsFiddle has an example. When you click a paragraph, the jQuery event handler replaces the HTML in the paragraph with a text box containing the text of the paragraph.
When you click the newly-created text box, the text in it disappears. This is because the event handler fires again when you click the text box: the HTML of the paragraph (the text box) is replaced with a text box containing the text of the paragraph. There's no text, so now you get a new empty text box.
There's a few ways you could stop this happening. When you create the text box, you could change the class of the paragraph, meaning your event handling code would no longer fire. Or, you could have another handler for the click event of the text boxes, and in here call the stopPropagation function.