New York (CNN Business) YouTube was forced to disable comments on a livestream of a House Judiciary hearing on hate crimes and white nationalism on social media Tuesday morning after it was flooded with racist and anti-Semitic comments.

The comments were an illustration of one of the issues at hand: Silicon Valley's ongoing struggle to stop the spread of hate across its platforms. Lawmakers are exploring possible legislative options on the issue.

"Due to the presence of hateful comments, we disabled comments on the livestream of today's House Judiciary Committee hearing," a YouTube spokesperson said in a statement. "Hate speech has no place on YouTube," they added.

Even here, the divide between Democrats and Republicans on the prevalence of racist material online could be seen. Rep. Jerry Nadler, a Democrat who chairs the committee, read during the hearing from a Washington Post story that referenced the hateful comments. Republican Rep. Louie Gohmert quickly responded, "could that be another hate hoax? Just keep an open mind."

The hearing included representatives from Facebook and Google, who were appearing on a panel with six other witnesses, including civil rights activists, the father of two victims of an Islamophobic attack, invited by Democrats, and a prominent right-wing activist, Candace Owens of the conservative group Turning Point USA, invited by Republicans.

Read More