Re: Canselable event not canseled.

Neil <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
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.
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.