title: KeyDown event gets invoked twice
body: <p>I've got this Prototype code to detect <kbd>Enter</kbd> pressing in textarea.</p>
  
  <pre><code>document.observe('keydown', function(e, el) {
      if ((e.keyCode == 13) &amp;&amp; (el = e.findElement('.chattext'))) {
          e.stop();
          // foo bar
      }
  }
  </code></pre>
  
  <p>And html</p>
  
  <pre><code>&lt;textarea id="chattext_17" class="chattext" cols="20" rows="3"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>But the problem is, that event gets invoked twice. I even tried to rewrite it to jQuery</p>
  
  <pre><code>$('.chattext').live('keydown', function(e) {
      if (e.keyCode == 13) {
          e.preventDefault();
          // foo bar
      }
  });
  </code></pre>
  
  <p>But even then the event gets invoked twice.</p>
  
  <p>When I try to debug it with FireBug, it always jumps here after completing the event handler</p>
  
  <pre><code>function createWrapper(element, eventName, handler) {
      var id = getEventID(element);
      var c = getWrappersForEventName(id, eventName);
      if (c.pluck("handler").include(handler)) return false;
  
      var wrapper = function(event) {
          if (!Event || !Event.extend ||  // always false here
              (event.eventName &amp;&amp; event.eventName != eventName))
              return false;
  
          Event.extend(event);
          handler.call(element, event); // here the event gets called again
      };
  
      wrapper.handler = handler;
      c.push(wrapper);
      return wrapper;
  }
  </code></pre>
  
  <p>I'm no Prototype guru, so I don't know where the problem could be.</p>
  
  <p><strong>Why is the keydown event invoked twice?</strong></p>