I don't think you can completely control it in Firefox.
You can make it snap back to the top of the page for example, like this:
$(document).on('mouseup', function(e) {
if (e.button == 1) {
window.scroll(0, 0);
}
});
If you keep track of the scrolling position you can make it jump back to there.