How to Prevent the Right-Click Menu from Opening When Switching Tabs

As shown in the attached image, I've set it up so that I can switch browser tabs by right-clicking and pressing the up or down keys. However, after switching tabs, the right-click menu opens every time I release the right mouse button.

Does anyone know how to prevent this?