How to keep onions from sinking in a salad
This is physics.

There's an effect called: "Granular convection"
It's a phenomenon where if you have materials of different sizes in a container and vibrate or shake them, that the largest objects will move to the top and the smallest to the bottom.

To keep the onion from sinking, you should make the chopped onion pieces bigger relative to the other ingredients in the salad.

As you can see in JBentley's answer, in a salad where all ingredients are evenly chopped you won't get the sinking effect.