Marshall had thrown the ball out due to an injury to Norwich midfielder Alex Tettey and Ricky van Wolfswinkel's throw in went to Fer, who tucked a shot into the bottom corner as Marshall awaited a return pass, sparking a fracas.
Initially Mackay thought Fer's actions were not intentional, but heard afterwards that the Holland forward had meant to score.
The Cardiff boss praised the official for the decision which ensured his side claimed a fifth point away from home this term.
Mackay said: "Common sense prevailed and sometimes common sense has to take over from rules when you're talking about sportsmanship and the reputation of our league, which is top class.
"Mick (Jones) certainly did that today. Whether that was the exact ruling or whether he should have given the goal and let us walk up and put the ball in the net, which would've been a complete mockery.
"I don't think that's something that anybody in the stadium would've wanted, maybe with the exception of Leroy Fer."
Hughton and his assistant Colin Calderwood told Mackay they would have allowed Cardiff to score had the goal stood.
"Immediately Colin and Chris came up and said, 'If Mick Jones gives it, we'll let you walk it into our net'," Mackay added.
"There was complete calmness from both benches. The boys were a little bit heated, but I think common sense prevailed.
"Everyone in the stadium, bar the boy (Fer) himself, sees that would've been an awful end to a football game and would've been poor for our league which is held in high regard throughout the world."
Hughton, who declined to say what his side would have done had the goal been allowed to stand, believes Fer's intentions were not to score.
"I would think he's playing the ball back to the goalkeeper," Hughton said.
"It happened very quickly and I didn't see all of it. What I did see was a throw-in for us, the ball going to Leroy and Leroy giving the ball back to them.
"I don't know if the pace of the ball took it in the net or if the goalkeeper left it."
Hughton believes, by the letter of the law, the goal should have stood.
"My initial thinking is that it should've been (allowed)," Hughton said.
"But I don't know the reasons why. I've only just heard that the referee said that he didn't whistle for play to commence.
"I wouldn't think that you have to (for a throw in), but I haven't seen him.
"It's not a way that you want to win a game. You want to win a game in the way that we should've won it today and that's by taking some of the chances that we had."
Norwich were dominant throughout but found Marshall in supreme form a week after he was dispossessed by Samuel Eto'o while bouncing a ball at Chelsea on an occasion when the goal incorrectly stood.
"He's an excellent goalkeeper," Mackay said.
"He was disappointed last week, even though he was certainly not at fault. He was disappointed because of the way we were playing at Chelsea in the first half.
"Today he showed what he's been showing me for two and a half years. He's a top, top goalkeeper.
"He was the best goalkeeper in the Championship last year and he's absolutely a Premier League goalkeeper."