It works pretty much the same as if someone were to scam you out of gold/crafting mats in a trade; they’ll remove the ninja’d item, but they won’t give it to the other player nor will they reimburse any lost gold.
But for things like this on the AH; where the price is clearly marked; even if the poster is trying to get someone not paying attention to buy it, they won’t step in.