Fix Firefox popovers

Branches off #597