title: TextBox keypress event not fires inside Google map infowindow
body: <p>I tried to allow only valid characters on a TextBox inside a Google map infowindow. The 'keypress' event is not fires. Please help me to resolve this problem.</p>
  
  <pre><code>google.maps.event.addListener(drawingManager, 'polygoncomplete', function(polygon) {
  
          var polylength=polygon.getPath().getArray().length;
          var lastarray=polygon.getPath().getAt(polylength-1);
  
              vertex=polygon.getPath().getArray();
          var contentString="&lt;form id='myform'&gt;Name:&lt;input name='cname' id='cname' type='text' size='50'&gt;&lt;/input&gt;&lt;br&gt;Address&lt;input name='addr' id='addr' type='text' size='50'&gt;&lt;/input&gt;&lt;br&gt;&lt;input type='button' value='submit' onclick='save();'&gt;&lt;/input&gt;&lt;/form&gt;";
          infowindow = new google.maps.InfoWindow({
              content: contentString,
              });
          infowindow.setPosition(lastarray);
          infowindow.open(map);
      }); 
  
  $('input').bind('keypress', function(event){
                   alert("pressed");
                  var regex = new RegExp("^[a-zA-Z0-9 ]+$");
                  var key = String.fromCharCode(!event.charCode ? event.which : event.charCode);
                  if (!regex.test(key)) {
                     event.preventDefault();
                     return false;
                  }
          });
  </code></pre>