From the Terminal

Enable Middle Mouse

In Firefox middle mouse click pastes by default. To fix it set these things in about:config

middlemouse.paste: false
general.autoScroll: true