When “West Side Story” star Ansel Elgort appeared on “The Late Late Show with James Corden” on Dec. 8, he gushed about attending the lavish New York City premiere for the Steven Spielberg film at Lincoln Center. He shared the advice the late Stephen Sondheim, who wrote the lyrics for the show, gave him after a recording session for the movie didn’t go well. And he gamely demonstrated how, as a kid, he’d parade around his home performing music from “Fiddler on the Roof.”

In other words, it was a standard, harmless late night talk show segment. Unless, that is, you looked at the comments for Elgort’s appearance on the show’s YouTube page.

A small sample:

“Everyone who made this happen… should be extremely disappointed and disgusted with themselves.”

“Hollywood waited a year hoping everyone would forget to try and bring Ansel back into the Hollywood scene. They think we’re dumb?”

“Ask him why he preys on high school sophomores/juniors.”

“What about the accusations against Ansel?”

The comments all stem from an allegation a woman posted to Twitter on June 19, 2020, that Elgort “sexually assaulted” her when she was 17 and he was 20. The woman said she had messaged Elgort over social media and they connected via Snapchat. “I was just a kid and was a fan of him,” she wrote. “So when it happened, instead of asking me if I wanted to stop having sex, knowing it was my first time and I was sobbing in pain and I didn’t want to do it, the only words that came out of his mouth were ‘we need to break you in.'”

The allegation instantly went viral. The following day, Elgort, now 27, posted to Instagram that he did have a “brief, legal and entirely consensual relationship” with the woman, and that he ghosted her after they broke up, which he said was “an immature and cruel thing to do to someone.”

But as for the woman’s allegation of assault, Elgort wrote that “her description of events is simply not what happened. I have never and would never assault anyone.”

Since the #MeToo era began, allegations like this have totally derailed careers and upended the release plans for major films. The allegations of sexual abuse against Armie Hammer at the start of 2021, for example, caused him to be recast in several projects and put the release of his last studio film, 20th Century Studios’ ensemble mystery “Death on the Nile,” into question. (Hammer has denied any wrongdoing.)

At first, it seemed like something similar would happen with Elgort and “West Side Story,” especially considering that, aside from Rita Moreno, he is the most famous face in the cast — thanks to his breakout roles in “The Fault in Our Stars” and “Baby Driver.” Disney’s decision to push the December 2020 release a year due to COVID-19 bought the movie some time, at least, but it didn’t change the fact that the leading man of one of cinema’s most beloved and iconic love stories had been accused of sexually assaulting a teenage girl. (Representatives for Elgort and Disney declined to comment for this story.)

Reshooting Elgort’s role — like Christopher Plummer did for Kevin Spacey’s role in 2017’s “All the Money in the World” and Tig Notaro did for Chris D’Elia’s role in 2021’s “Army of the Dead” — was a non-starter: Unlike Plummer and Notaro, Elgort is not a supporting performer. Reproducing virtually all of the vast, intricate sets in “West Side Story” would have been cost prohibitive. Elgort’s limited presence in the movie’s trailers led some observers to conclude that the studio’s strategy would be to severely curtail the actor’s media exposure.

Instead, Disney has engaged in a dexterous press strategy to put Elgort in the public eye in a way that has minimized any possible fallout. It’s helped that Elgort has been an enthusiastic participant in the “West Side Story” press tour. Along with talking with James Corden, Elgort appeared on “The Drew Barrymore Show,” presented on the American Music Awards, participated in dozens of interviews during the global press junket and walked the full press line at the New York City premiere.

He has not, however, sat for the kind of in-depth, one-on-one interviews one would expect of the star of a movie of this stature: no feature profiles or cover stories, no lengthy podcast interviews, nothing in which he would almost certainly have been asked about the assault allegation. His junket interviews were also grouped with other actors, further protecting Elgort from the potential of uncomfortable questions. And while he has posted a few times to Instagram about “West Side Story,” he’s stayed off Twitter entirely, preventing him from promoting the film to his 3.3 million followers there.

Still, Elgort has been talking, and, to date, no one has asked him about the allegation, including in a brief interview with Variety at the New York premiere.

Another complicating factor is that the entire episode unfolded exclusively over social media. Within days of her original post to Twitter, the woman deleted the tweet, shut down her account and has not posted about it since. Elgort also deleted the Instagram post with his response. Other women have since posted to Twitter alleging that Elgort made inappropriate overtures to them over social media when they were underage, with screengrabs that appear to support their claims. But Elgort has not commented on those allegations; no one else has accused Elgort of anything similar to the original assault allegation; and none of the allegations against him have been independently corroborated.

In that atmosphere, and with a press corps unwilling to broach a contentious subject in an inconvenient forum, Elgort has navigated the “West Side Story” release without ever having to address what could have been a career-killing allegation.

It’s impossible to know what impact these efforts have ultimately had on the movie, which debuted this weekend with an estimated $10.5 million domestically — a striking disappointment that likely has as much to do with consumer reticence to return to movie theaters amid the Omicron COVID-19 variant as any other reason. But it is at least clear that Elgort’s professional life does not appear to have been harmed. The actor spent much of 2021 shooting the first season of the HBO Max series “Tokyo Vice” with directors Michael Mann and Destin Daniel Cretton. And after “West Side Story” screened for members of SAG-AFTRA the day before the New York City premiere, Elgort was the first member of the cast to step to the stage for the follow-up Q&A. He received an enthusiastic standing ovation.

Elgort better hope, however, that no one posts the moment to the internet. There’s not nearly as much applause there.