When you scroll down the NPC inventory list and buy something, the list is reset and the purchase selection window is reset to the first item in the vendor's inventory.
I think it would be nice if the list didn't reset and you just kept your place.
That's totally client side. Nothing we can do. I think the rationale was that since you bought something, the list might have changed, so they refresh it. I agree it IS annoying.