In this question, the following sequence of events happened:
- The OP asked the question.
- I started writing an answer.
- Someone (say, Alice) commented that it was a duplicate question.
- I submitted my answer and moved on to something else; I didn't see the comment.
- Later, my answer was downvoted. Someone else (say, Bob) commented to the effect that I should have read Alice's comment before posting. They further noted that because the question was a duplicate, I should have done a search before posting any answer to see if I was answering a duplicate question.
- The question was closed as being a duplicate.
- When I saw the notification from Bob's comment, I looked for Alice's comment, but it was gone; apparently, Alice had deleted their comment.
- I commented to indicate that I'd open a question on meta because I wasn't sure about the procedure in this case.
Are answerers responsible for ensuring that they are not about to write an answer to a duplicate question?
Should I have deleted my answer once it became apparent that the question was a duplicate?