title: firefox+jquery mousewheel scroll event bug
body: <p><strong>UPDATE</strong> Working fix as suggested by David (see below):</p>
  
  <p>replace</p>
  
  <pre><code>    $('.scrollMe').bind("mousewheel DOMMouseScroll", ...) 
  </code></pre>
  
  <p>with</p>
  
  <pre><code>    $('.scrollMe').bind("mousewheel DOMMouseScroll MozMousePixelScroll", ...) 
  </code></pre>
  
  <p><strong>ORIGINAL POST</strong></p>
  
  <p>Firefox 16.0.2 (latest) shows an issue when binding the "mousewheel / DOMMouseScroll" event. Scrolling with the mousewheel while the mouse pointer is on top of my targeted div causes the window to scroll as well- whilst I obviously don't want this.</p>
  
  <p>I tried adding several methods to stop propagation etc. but nothing seems to work.</p>
  
  <p>Javascript code:</p>
  
  <pre><code>    $(document).ready(function() {
              $('.scrollMe').bind("mousewheel DOMMouseScroll", function(e) {
                  e.stopImmediatePropagation();
                  e.stopPropagation();
                  e.preventDefault();
  
                  var delta = parseInt(e.originalEvent.wheelDelta || -e.originalEvent.detail);
  
                  $(this).empty();    
                  return false;
              });
      });
  </code></pre>
  
  <p>To see it in action, please follow the jsFiddle link below. On the example page, simply place the mouse pointer inside the div with red boxes and use your mouse's scrollwheel. Firefox will scroll the parent window the first time (unexpectedly), whilst other browsers don't.</p>
  
  <p><a href="http://jsfiddle.net/nWXBp/1/">jsFiddle Code example</a></p>
  
  <p>Peculiar is that Firefox doesn't repeat the behaviour once you fire the event on the bound element, meaning it stops scrolling the page. However, it does repeat this behaviour after you manually scroll the page afterwards and try again.</p>
  
  <p>I've also tested this in IE9 and Chrome but couldn't detect this issue in those browsers (meaning they don't scroll the window unexpectedly), so I'm guessing it's Firefox-specific (also disabled every plugin in firefox etc.)</p>
  
  <p>Is this truly a bug in firefox (and if so is there a cross-browser hack that might do the trick)? Or, if you know of any other solution to achieve the same effect of catching the mousewheel event without having the page's window scroll, please feel free to answer!</p>