I never claimed that EU sanctions did have any power over them. What relevance does that have here? Again Gibraltar is an EU member, the ship was stopped in Gibraltar's waters not Iran's.
You seem rather confused, just because a ship's cargo is owned by a country doesn't mean that country's laws apply wherever that cargo goes - if that was the case then any number of companies say based in Amsterdam could transit say recreational drugs all through whatever territorial water's they liked.
Back to the point the other poster was making questioning whether this occurred in Gibraltar's waters - the Spanish don't seem to be disputing where it occurred (just who owns the waters, they apparently even sent one of their own vessels to observe)
https://elpais.com/elpais/2019/07/05/inenglish/1562310818_569487.html
Great. So you will have zero problems with Iran seizing British ships travelling near their coast if they decide to 'sanction' us?