Use flexbox when available.

Makes things actually work on firefox.
Prevent click event on sort

Unlike most browsers, firefox raises the click event even if an element
has been removed/re-inserted between mouseup/mousedown events. This
means that it was getting fired on sort.