When you right-click. Won’t that trigger click with e.which === 3 and fail that condition?
click
e.which === 3
I ask without being sure.