What I am doing:
I use Command+F to search my current document.
I find a word I want to change. I double-click on the highlighted word that was found by the search. It becomes highlighted. I begin typing. Instead of editing the word I double-clicked on, my typing is appended to the end of my search.
It seems that for some reason the text document does not gain keyboard focus if you double-click on a section of text that matched the search. This is inconsistent with the usual behavior. If I double-click any other word while performing a search, the document gains focus, but for some reason it does not if the word matched the search.