Cory Dodt wrote:
Can't we just stopPropagation/preventDefault on keycode 27?

For what it's worth, I was using MochiKit's signal and event normalisation mechanism, and had:

<input type="text" id="foo" />

With:

function myonkeydown(event) {
  var key = event.key()['string'];
  /* some stuff, then */
  if (key=='KEY_ESCAPE')
    event.stop();
}

connect('foo', 'onkeydown', myonkeydown);

MochiKit's event.stop() is documented as (and looking in the code, does) call stopPropagation and preventDefault. It did neither, so perhaps escape is handled specially or perhaps I just need to also handle 'onkeypress'

HTH

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to