title: Enter key triggers jquery .on function for different field
body: <p>When the enter key is used on the input type=text field, the defined jquery .on function is triggered for the input type=image field within the table. Both those fields are within the same form, however they don't use the same class. Is there a way to prevent the enter key from triggering on the input type=image's functionality when it is used within the input type=text field? </p>
  
  <p>Basically I want it to be like:</p>
  
  <ul>
  <li>enter key pressed on input type=image --> call .on function</li>
  <li>enter key pressed on input type=text  --> do default behaviour (dont't call the .on function)</li>
  </ul>
  
  <p>Also, I noticed that when the enter key is pressed within the input type=text field, the "click" event is automatically used rather than a "keydown" or "keypress" event. Is this natural behavior?</p>
  
  <p><strong>jquery</strong></p>
  
  <pre><code>$('#items tbody').on('keypress click', '.cssWrapper', function)
  </code></pre>
  
  <p><strong>html</strong></p>
  
  <pre><code>&lt;table id="items"&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;East&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;Open&lt;/td&gt;
              &lt;td&gt;
                  &lt;div class="cssWrapper"&gt;
                      &lt;input type="image" src="item.jpg" id="img_1"&gt;
                  &lt;/div&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;West&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;Close&lt;/td&gt;
              &lt;td&gt;
                  &lt;div class="cssWrapper"&gt;
                      &lt;input type="image" src="item.jpg" id="img_2"&gt;
                  &lt;/div&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  
  &lt;table style="width:100%;"&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;label for="addr"&gt;Address - &lt;/label&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;input id="addr" name="addr" type="text" maxlength="30" title="Enter Address"&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>