Web Maps Lite API documentation:: stopEvent, Stops the given event from propagation and prevents it’s default action. CM.stopPropagation, Stops the given event from propagation. http://www.cloudmade.com/developers/docs/web-maps-lite/files/util-js.htmlHOME | Hey All,
I have a modal dialog, and I'd prefer that hitting tab not allow them to escape the modality to elements below. So I attach a key listener to the body of the dialog, then on tab, only allow them to tab through the form on the dialog. Ok, but the event is escaping to the browser. The One Stop Event for Embedded Linux Developers | i10:: For embedded engineers working with Linux or considering using Linux, the Embedded Masterclass 2008 is turning into a 'one stop event' for Realtime and http://www.i10.org.uk/node/8037HOME |
Firebug showing everything working fine, just that after this executes (including the stopEvent statement), the browser gets the event. Any thoughts on why my key event isn't being stopped ?
var container = Ext.get(... some element) ;
// handle tab
container.addKeyListener(9, function(key, e){
var el = Ext.get(e.getTarget());
var form = el.findParent("form");
var incr = e.hasModifier()?-1:1;
var next;
for(var i=0, len = form.elements.length; i
next = i + incr; A Blog of ICE » A three day non stop event:: A three day non stop event. Posted on July 8th, 2007 by David Eves. The date is set: 2008 - Point Hope - TIKIGAQ - June 15 - 17 Come on up.. have the time http://majikimaje.com/WordPress/?p=9HOME |
if(next >= 0 && next < len)
if(form.elements[i] == el.dom) {
form.elements[next].select();
// stop
e.stopEvent();
}
}
}, this);
Hi Tommy,
It's in there, in the conditional logic which I've verified as running.
-jeff
try to put e.stopEvent() at the top of your event handler
Where's The Advantage In Windows Genuine Advantage?
Stocks Bounce After S&P Joins Bear Market
|