Drag events following pressed events.
    Eric Le Ponner 
    eric.le.ponner at oracle.com
       
    Wed Apr 23 15:05:48 UTC 2014
    
    
  
You might have a look to PopupWindow.consumeAutoHidingEvents property.
By default, it’s true so I think it’s why PopupWindow consumes the MOUSE_PRESSED event.
If you turn it to false, MOUSE_PRESSED event should flow up and reach your background object.
Eric
Le 23 avr. 2014 à 16:40, Robert Fisher <rfisher at tesis.de> a écrit :
> Hi everyone,
> 
> I'm confused about how pressed and dragged events are related in JavaFX. My initial assumption was that MOUSE_PRESSED events would *always* precede MOUSE_DRAGGED events. That is, you would never find a case where a MOUSE_DRAGGED event fired on a node and a MOUSE_PRESSED event had not fired.
> 
> However I then found the following exception: when I have a popup showing that is configured to hide itself when it loses focus. If I drag on a background node, a MOUSE_DRAGGED handler will fire but a MOUSE_PRESSED handler will not. Like the MOUSE_PRESSED event is being consumed in the process of hiding the popup, or something. I observed this behaviour in both JavaFX 7 and 8.
> 
> Is this a bug? Or am I making too many assumptions about how MOUSE_PRESSED and MOUSE_DRAGGED events are related?
> 
> Cheers,
> Rob
    
    
More information about the openjfx-dev
mailing list