Dropbox does a wonderful job with its right-click functionality.
Hovering with your mouse over a directory looks like this:

Clicking on the underlined link (music) navigates there, but clicking anywhere else in the frame, as well as the "dropdown" sign, or right-clicking(!) opens the following menu:

This has so many benefits:
- It doesn't block the user from right-clicking - it gives the users what they wanted (a context menu) and shows them where it can be accessed without a right-click.
- This menu is discoverable, unlike the right-click which has to be guessed.
- No problem to consistently support touch devices.