Added document change handler to close the replace panel if it's open.