title: Why is event.clientX incorrectly showing as 0 in firefox for dragend event?
body: <p>The alert from <code>dragend</code> is showing <code>mouseX</code> as zero no matter where it is currently. This works fine in Chrome so not sure what I'm doing wrong.</p>
  <pre><code>function move(e,obj,but){
      if(typeof(obj) === 'string'){
          obj = document.getElementById(obj) ;
      }
      
      if(typeof(but) === 'string'){
          but = document.getElementById(but) ;
      }
  
      //elementCoord(but) ;//get the current coords of the button &amp;
      elementCoord(obj) ;//the container
      
      e = e || window.event ;
      var mouseX = e.clientX ;
      var mouseY = e.clientY ;
              
      //alert('mouseX='+mouseX+', but.XCoord '+but.XCoord) ;
      var diffX = Math.abs(obj.XCoord - mouseX) ;
      var diffY = Math.abs(obj.YCoord - mouseY) ;
      
      but.addEventListener(&quot;dragend&quot;,function(evt){
          evt = evt || window.event ;
          mouseX = evt.clientX ;
          mouseY = evt.clientY ;
          obj.style.left = mouseX - diffX + 'px';
          obj.style.top = mouseY - diffY + 'px';
          alert('mouseX='+mouseX+' diffX='+diffX) ;
          }
      ,false) ;
      
  }
  </code></pre>
  <p>Forgot to mention, <code>elementCoord</code> just gets the offset of an object adding it as a property. It works fine in all browsers.</p>