Theoretically, it never did. Also theoretically it never stopped. The last head of the Supreme Soviet, Gorbachev was "elected" in 1985. Leaders of the Supreme Soviet were elected by a body called the politburo who would appoint their favoured candidate from among the communist factions. Of course non communist parties were prohibited to preserve the revolution. These factional leaders were still elected by members of the communist party, but it's not exactly what we'd call democracy.