you you cant' close teh vent otherwise fuel will not get in and will spit out of the filler.
if the vent is properly sized, it shoudnt' spit out during filling. if it does, check to make sure the vent fitting and the screen isn't dirty/clogged. If it's clean the only option is go a little slower when filling. depends on the pump, at some high speed diesel pump it's not unusual not to go full speed.
One trick you can use, depending on the boat, is to put a Tee in the vent line and find a way to route a hose off the tee outside and put it in the filler. I did this on my boat which was easy because the fillers fro both tanks are together and right next to the ER vents. Before filliing, I turn a 3 way valve on the vents and push a 6' clear hose out the ER vent. this diverts my vents into the filler. any fuel spitting out goes back in the tank. still has to be careful when almost full obviously.
There are also a number of devices on the market, ranging from catch bottles you attach out the vent with suction cups, to devices you put in the vent lines. tehre is also something taht diverts the vent like i did, but using what looks to be a fuel filler cap. neat, although the hose size is a little small for larger boats with large vents.