title: preventDefault() not working in a input type text
body: <p>This is my code:</p>
  
  <pre><code>$('#Login').keydown(function(e){         
          if(e.which  == 32){     
              alert("enter");
              this.preventDefault();            
          }        
      });
  </code></pre>
  
  <p>This code doesn't work but sends the alert </p>
  
  <pre><code>$('#Pwd,#Pwd2').on('keydown',function(e){
          if(e.which == 32){
              e.preventDefault();
          }
      });
  </code></pre>
  
  <p>And this code works.
  I do not understand why.</p>