stopEvent
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.
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
if(next >= 0 && next < len)
if(form.elements[i] == el.dom) {
form.elements[next].select();
// stop
e.stopEvent();
}
}
}, this);
It's in there, in the conditional logic which I've verified as running.
-jeff

