Hi Robert,

Robert Wende schrieb:
> hey Daniel,
> 
> thanks for your reply. i have solved the problem in my popup-class as follows:
> 
> this._clockPopup.getApplicationRoot().addListener("mousewheel", function(){
>   if (this.getPopupMode()) {
>     this._clockPopup.exclude();
>   }
> }, this, true);
> 
> But the last "true" isn't not yet understandably.

I'll try to explain it better: By default, event listeners are attached 
to the bubbling phase, where an event is dispatched on its target and 
then propagates along the parent chain until it reaches the document's 
root node. But the container intercepts the event and stops the event 
propagation, so it will never reach the application root where the 
listener is attached.

Instead, by adding the "true" option to addListener, we attach the 
listener to the capturing phase, where the event travels down the DOM 
tree starting from the root node, so it reaches the qooxdoo application 
root node (and triggers the listener) before reaching the container.

Hope this clears things up.

Regards,
Daniel

> 
> Robert
> 
> -------- Original-Nachricht --------
>> Datum: Wed, 15 Jul 2009 11:35:35 +0200
>> Von: Daniel Wagner <[email protected]>
>> An: qooxdoo Development <[email protected]>
>> Betreff: Re: [qooxdoo-devel] Popup close when scrolling
> 
>> Hi Robert,
>>
>> try attaching your listener to the application root like this:
>>
>> this.getRoot().addListener("mousewheel", function() {
>>    this.popup.exclude();
>> }, this, true);
>>
>> The final "true" argument is important since it attaches the listener to 
>> the capturing phase of the event propagation. By default, the listener 
>> is attached to the bubbling phase which means the event wouldn't reach 
>> the application root if, for example, the mousewheel was used over a 
>> scroll container inside your application.
>>
>>
>> Regards,
>> Daniel
>>
>> Robert Wende schrieb:
>>> hello,
>>>
>>> i have a new problem with my popup. when the user scroll in the
>> application i want to close my popup like the calender in the datefield.
>>> the event mousewheel only works if my cursor is situated over the popup.
>> is there a possibility to close the popup when my cursor is located
>> outside the popup?
>>> thanks,
>>> Robert
>> ------------------------------------------------------------------------------
>> Enter the BlackBerry Developer Challenge  
>> This is your chance to win up to $100,000 in prizes! For a limited time, 
>> vendors submitting new applications to BlackBerry App World(TM) will have
>> the opportunity to enter the BlackBerry Developer Challenge. See full
>> prize  
>> details at: http://p.sf.net/sfu/Challenge
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to