BETHEL PARK, Pa. — FBI Director Christopher Wray revealed during a House Judiciary Committee hearing that someone affiliated with the agency is being internally investigated for posting something "totally inappropriate" about former President Trump's assassination attempt.

Wray's comments came while the agency's director was testifying under oath on Wednesday on the Trump rally shooting in Butler, Pennsylvania, and the subsequent investigation into the gunman, Thomas Matthew Crooks.

Rep. Chip Roy, R-Texas, asked the director whether "any FBI agents texted, emailed or expressed disappointment that Trump survived the assassination attempt or otherwise editorialized about the assassination attempt?"

Wray said he was not aware of any agents voicing inappropriate rhetoric, but there had been one instance "of an individual who posted something that I consider outrageous, totally inappropriate, and unacceptable."

TIMELINE: TRUMP ASSASSINATION ATTEMPT

Wray testifies in DC

FBI Director Christopher Wray testifies during a Senate Homeland Security and Government Affairs Committee hearing on Capitol Hill in Washington, D.C., on Oct. 31, 2023. (Mandel Ngan/AFP via Getty Images)

The agency's director said the individual was referred to the FBI's inspection division for an internal investigation.

"That individual has been referred to our inspection division, which is our sort of internal affairs investigatory arm that does the disciplinary process," Wray said.

Wray did not specify where the post was made or the title or employment status of the individual.

An undated image of Thomas Matthew Crooks.

An undated image of Thomas Matthew Crooks. (Handout via AFP)

Wednesday's explosive testimony also included revelations about Crooks' search history and details surrounding the morning of the assassination attempt on Trump.

Crooks searched for details about President John F. Kennedy's assassination from his laptop and flew a drone in the area near the rally just two hours before Trump took the stage, Wray said.

DETAILS ABOUT HOW TRUMP SHOOTER SCALED BUTLER RALLY ROOF EMERGE IN FBI DIRECTOR CHRISTOPHER WRAY'S TESTIMONY

Wray said his agency is still not certain how Crooks accessed the roof of the building where he took aim at Trump — but they don't believe he used a ladder.

"We did not find the ladder at the scene," Wray told Rep. Steve Cohen, D-Tenn. "He did buy a ladder. But the ladder was not found at the scene."

Donald Trump is seen with blood on his face surrounded by secret service

Former President Trump is seen with blood on his face and surrounded by Secret Service agents as he is taken off the stage at a campaign event in Butler, Pennsylvania, on July 13. (Rebecca Droke/AFP via Getty Images)

Wray's testimony came just one day after Secret Service Director Kimberly Cheatle resigned after pressure from Democrats and Republicans over failed security at the Trump rally on July 13. 

CLICK HERE TO GET THE FOX NEWS APP

Fox News Digital has reached out to the FBI for comment.