setInterval doesn't work on right mouse click (IE9)

Why does setInterval stop when the right mouse button is clicked and the menu appears, and does not continue until the menu disappears? And how can I work around?

I try to program a simple timer, but as described above, the timer stops as soon as the right mouse is clicked and the menu appears, and does not work until the menu disappears.

  • How do I keep form data when Back button is clicked
  • IE parameters get undefined when using them in setTimeout
  • SCRIPT438: Object doesn't support property or method 'endsWith' in IE10
  • How to create Cross Domain XMLHTTPRequests in Internet Explorer
  • How to turn off script debugger in Visual Studio 2013
  • jQuery val() returns an array with IE8 on select/option element
  • Get the hashchange event to work in all browsers (including IE7)
  • IE\Firefox garbage collection for localhost\external site
  • JQuery - Detect support for CSS 'display: table-row-group'
  • On Windows Phone's IE Touchstart Event Ends Automatically After Few Seconds
  • Firefox vs. IE: innerHTML handling
  • jQuery .animate issues in IE8
  • One Solution collect form web for “setInterval doesn't work on right mouse click (IE9)”

    Workaround You can prevent the context menu from appearing by stopping the contextmenu event.

    document.addEventListener('contextmenu', function(e){
        e.preventDefault();
        e.stopPropagation();
    }, false);