Amid renewed racial tensions after a deadly, and apparently unprovoked, shooting of a black man in Minnesota and another in Louisiana, events capped by an attack of police officers in Dallas during protests, the focus of the presidential race was to move to Florida and Pennsylvania. Instead, on Friday, Donald J. Trump and Hillary Clinton canceled campaign appearance after the ambush in Dallas.

In Miami, Mr. Trump, the presumptive Republican nominee, had been scheduled to give a speech — the topic had not been revealed by Thursday evening — and appear with Gov. Chris Christie of New Jersey, one of his vice-presidential prospects.

It would have been his first trip in a month to a battleground state, one with a large Hispanic population. And he has tried with deeply mixed levels of success to sustain a case against Hillary Clinton, the presumptive Democratic nominee, over admonitions from the F.B.I. director, James B. Comey, about her “extremely careless” use of a private email server.

Mrs. Clinton postponed a rally with Vice President Joseph R. Biden Jr., but planned speak in Philadelphia about the police-related deaths of Alton B. Sterling in Louisiana and Philando Castile in Minnesota.