Re: Canselable event not canseled.

YuLo <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
понедельник, 8 октября 2012 г., 1:21:31 UTC+4 пользователь Neil написал:
> YuLo wrote:
> 
> 
> 
> >Nail wrote:
> 
> >  
> 
> >
> 
> [How did you manage to spell my name incorrectly?]
> 
> 
> 
> >>Unfortunately the XBL [1] that handles the key events for tree widgets does not check for the PreventDefault action (indeed, it doesn't even run in the system event group). So the only way to stop it is to capture the event before it reaches the tree and stop the event's propagation.
> 
> >>
> 
> >as far as i understand i capture the event
> 
> >DomEventTarget->AddEventListener(NS_LITERAL_STRING("keydown"), this, PR_TRUE);
> 
> >
> 
> >and stop event propagation
> 
> >keyEvent->StopPropagation();
> 
> >
> 
> >but no result!
> 
> >  
> 
> >
> 
> Sorry, I should have pointed out that the tree widget looks for the 
> 
> keypress event, so that's the one you have to capture, and of course 
> 
> capturing on the element itself doesn't help because stopPropagation 
> 
> only stops dispatch to subsequent elements.
> 
> 
> 
> -- 
> 
> Warning: May contain traces of nuts.

Sorry, Neil, and thank you very much for your help.
I accidentlaly deleted your name, then wrote it by hand with error.
Hope you'll excuse me.
_______________________________________________
dev-tech-xul mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.