He is quoted by The Guardian as saying: "Normally I stay outside the box on corners but I followed my intuition and went inside".
The Argentine striker was on target during City's 2-0 win over Fulham on Saturday, bagging his 19th league goal of the season with a classy finish over Sergio Rico.
Mendy, who was not in the team for Saturday's game at Fulham, took part in training later in the day but the incident may test Guardiola's patience with the defender, who was signed from Monaco for £52m in 2017.
Guardiola said his players are "excited" about what they can achieve but urged them not to get carried away.
Manchester City fans will be bemoaning Liverpool's latest fortunate finish but poor Cardiff fans have far more to complain about after Sunday's defeat at home to Chelsea.
Guardiola said: "Of course".More news: Billionaire Russian airline owner killed in plane crash
"Seven games left for the Premier League, and it's easy - we have to win every game to be champions", Guardiola said.
When these two sides met at Anfield last season, Salah scored one his many goal of the season candidates amidst an incredible 44-goal campaign. "We will see his evolution in the next few days". I'm not his father, ' Guardiola said.
Had the game ended 1-1, the Citizens would have gone in to Wednesday's game with Cardiff knowing they'd remain top of the league even if they lost but there's no let up now and victory will only see them edge ahead again by a point. The best team at the end of the season will win it.
"What Bernardo has done this season is a outcome of the way he accepts his role", said Guardiola after another starring role at Craven Cottage.
Fosu-Mensah's sliding challenge on Sterling saw the England forward go to ground only for referee Kevin Friend to wave away penalty claims, and Fulham nearly pulled a goal back when Chambers freed Ryan Sessegnon for a low effort that Ederson parried.
Cardiff, what I saw in the last game against Chelsea, is alive. I feel like this season can be a big one - even though I had the same feeling previous year and we struggled in a few competitions.
"We wanted it, we get used to the situation, step by step, a bit better".