From ScotusBlog.com
There were several nominations and confirmations of Justices during presidential election years.
March 13, 1912, President William Taft (a Republican) nominated Mahlon Pitney to succeed John Marshall Harlan, who died on October 14, 1911. The Republican-controlled Senate confirmed Pitney on March 18, 1912, by a vote of fifty to twenty-six.
President Woodrow Wilson (a Democrat) made two nominations during 1916. On January 28, 1916, Wilson nominated Louis Brandeis to replace Joseph Rucker Lamar, who died on January 2, 1916; the Democratic-controlled Senate confirmed Brandeis on June 1, 1916, by a vote of forty-seven to twenty-two. Charles Evans Hughes resigned from the Court on June 10, 1916 to run (unsuccessfully) for president as a Republican. On July 14, 1916, Wilson nominated John Clarke to replace him; Clarke was confirmed unanimously ten days later.
On February 15, 1932, President Herbert Hoover (a Republican) nominated Benjamin Cardozo to succeed Oliver Wendell Holmes, who retired on January 12, 1932. A Republican-controlled Senate confirmed Cardozo by a unanimous voice vote on February 24, 1932.
On January 4, 1940, President Franklin Roosevelt (a Democrat) nominated Frank Murphy to replace Pierce Butler, who died on November 16, 1939; Murphy was confirmed by a heavily Democratic Senate on January 16, 1940, by a voice vote.
On November 30, 1987, President Ronald Reagan (a Republican) nominated Justice Anthony Kennedy to fill the vacancy created by the retirement of Lewis Powell. A Democratic-controlled Senate confirmed Kennedy (who followed Robert Bork and Douglas Ginsburg as nominees for that slot) on February 3, 1988, by a vote of ninety-seven to zero.
In two instances in the twentieth century, presidents were not able to nominate and confirm a successor during an election year. But neither reflects a practice of leaving a seat open on the Supreme Court until after the election.