Disable middle-click for new tab

I use middle click to quickly scroll down and up, when I scroll up and the mouse ends up into the titlebar, it opens a new tab. I've searched in the browser and online for no solution to disable the middle click to open new tabs. Is there a possible way to do that?

if you don't know what I am refering to, hold middle click while in a webpage body and move the mouse up into titlebar and release, that opens a new tab.