Shauna Hunt interviews a Toronto FC soccer fans in Toronto on Sunday, May 10, 2015, in this video frame grab.

It doesn’t matter that it happened while they were off the clock. Thanks to social media, two Toronto men who made obscene remarks to a female TV reporter are learning that workplace-harassment rules extend well beyond the office environment.

Within the span of just one business day, a video showing two men defending the sexual harassment of CityNews reporter Shauna Hunt at a Toronto FC game went viral, the online profiles of the men were posted on social media by internet sleuths and their employers were forced to address what happened – one firing their employee, the other promising to “address” the situation.

While individuals have long expected that what they say and do in their private time is none of their employer’s business, social media has changed the game dramatically. Bad employee behaviour has become as much a problem for companies’ public-relations teams as it is for their legal teams.

Like thousands before him, a man at a Toronto FC game thought it would be amusing to interrupt a TV reporter doing a live hit Sunday by making an extremely obscene comment to the camera, a prank that’s become common in the past few years. When others nearby laughed and confessed to planning to do the same stunt, Ms. Hunt confronted them about the “disrespectful” and “degrading” phrase.

“Why is it so funny?” she implores one.

He replies cheerfully that the comment is “hilarious” and “amazing.”

When Ms. Hunt asks him how his mother would feel about his actions, he says with a smile: “My mom will die laughing eventually.”

A few hours after the video had circulated online, that man, a Hydro One employee, was fired.

“Hydro One is taking steps to terminate the employee for violating our Code of Conduct,” Hydro One spokesman Daffyd Roderick said in a statement. “Respect for all people is ingrained in the code and our values. We are committed to a work environment where discrimination or harassment of any type is met with zero tolerance.”

The statement did not name the employee, but The Globe and Mail has confirmed that he is Shawn Simoes, an engineer who, according to the most recent provincial Sunshine List, earned more than $107,000 a year in wages and benefits.

In the past, employees could only be punished for behaviour outside the office if it directly hurt an employment relationship or impacted their employer in some way, says Stuart Rudner, a partner at the employment law firm Rudner MacDonald LLP. But because of social media, an employee can still face the wrath of their employer, even if their inappropriate statements are unrelated to their workplace.

“That’s what we’re seeing more and more of now: people going online and making … offensive comments, and if it’s possible to identify where they work, it can impact the employer and therefore lead to discipline,” Mr. Rudner said.

He referenced a 2012 case in which a Toronto man lost his job after posting a hateful comment on a memorial Facebook page for teenager Amanda Todd, who killed herself after suffering years of bullying. A woman reading the page identified the man’s employer as Mr. Big and Tall and sent them a message, which prompted them to fire the man.

In another part of the video from Sunday’s soccer game, Ms. Hunt confronts a second man, who confesses he was waiting to make the same lewd comment to her. “Can I ask why you would want to do something like that?” she asks.

“I feel like it’s quite substantial,” he says, smirking from behind aviator sunglasses.

That man was identified Tuesday on Twitter as an employee of Cognex. The Globe could not confirm the man’s name. Sarah Laskowski, a spokesperson for Cognex, said “we find such comments reprehensible.” She pointed out that while the employee’s comments were made on his own time, “we take this issue seriously and will be addressing it.”

Ontario Premier Kathleen Wynne also jumped into the fray, sending a tweet praising CityNews for airing Ms. Hunt’s footage and condemning workplace sexual harassment.

While the two men shut down their Facebook and LinkedIn accounts on Tuesday, they weren’t quick enough. Some who were outraged by their actions quickly harvested photos and information about them and their employers from their profiles earlier in the day and shared them on Twitter, tagging the Hydro One and Cognex corporate accounts, asking if the companies planned to take action. With pressure mounting, both companies released statements before the end of the business day.

“It’s all about public relations,” Mr. Rudner said. “They obviously thought it was in their best interest – not necessarily from a legal perspective, but from a PR perspective – to deal with it expeditiously.”

Mr. Simoes and the Cognex employee also face a ban of at least a year from all games of the Toronto soccer club and other teams owned by the parent company, Maple Leafs Sports and Entertainment.

“We’re appalled that this trend of disrespectful behaviour would make its way to our city, let alone anywhere near our stadium,” MLSE said in a statement released Tuesday afternoon.

The reporter, Ms. Hunt, told The Canadian Press that she had not planned to question two men who began hurling sexually explicit remarks as she was covering the soccer game, but the anxiety triggered by their remarks proved to be the last straw.

“I hit my limit and I had to push back,” Ms. Hunt said in a telephone interview. “I wasn’t going to stand for it any more. It was time to say something.”