The primary factor that prevents the planets in our solar system from floating away is the Sun's gravitational pull. The Sun contains more than 99% of the total mass of the solar system, creating a strong gravitational field that keeps the planets in stable orbits around it. While the gravitational interactions between the planets do exist, they are relatively minor compared to the dominant gravitational force exerted by the Sun.
Therefore, the correct answer to your question is Sun's gravitational pull.