Hi Mustafa,

I am not able to reproduce it in a simple play ground example unfortunately.
Maybe describing my actual example can shed more light on this issue?

I have a class deriving from a qx.ui.container.Composite with a grow layout.
Inside there is an HTML5 canvas on which items are draw.
I am modeling dragdrop on the container to be able to dragdrop elements drawn 
on the canvas.
Maybe in different browers this canvas somehow gets the focus causing the 
container to loose the focus and drag events not to be propagated?

Best regards,
Jeroen

From: Mustafa Sak [mailto:[email protected]]
Sent: woensdag 23 oktober 2013 14:33
To: qooxdoo Development
Subject: Re: [qooxdoo-devel] Drag&drop not working correctly in Chrome, 
FireFox, Opera

Hi Jeroen,

We are also using Drag and Drop in our applications. And currently all browser 
are working proper. Could you please provide us with a playground example?

Gruß
Mustafa Sak

Applications & Integration

1&1 Internet AG
Ernst-Frey-Straße 10
DE-76135 Karlsruhe

Von: Jeroen Smit [mailto:[email protected]]
Gesendet: Mittwoch, 23. Oktober 2013 14:05
An: Qooxdoo-Devel
Betreff: [qooxdoo-devel] Drag&drop not working correctly in Chrome, FireFox, 
Opera

Hi,

I have just implemented dragdrop from a custom control and in IE this seems to 
work pretty much out of the box by just calling setDroppable and setDraggable 
icw some drag events.

In several other browsers I kept getting the "invalid drag" cursor and was able 
to locate the issue in the "qx.event.handler.DragDrop" code where extra events 
are registered in _onMouseMove during the drag operation. The logic that checks 
if the operation is valid is located in the mouseover event, but this event is 
not triggered in many browsers.

As a workaround I implemented a mouse move on my own control and forwarded the 
event to the drag drop handler like this:

  var mgr = 
qx.event.Registration.getManager(this).getHandler(qx.event.handler.DragDrop);
  if (mgr) {
      var target = null;
      var fEl = this.__innnerControl.getFocusElement();
      if (fEl) {
          target = fEl.getDomElement();
      }

      var event = qx.event.Registration.createEvent("mousemove", 
qx.event.type.Mouse, [{}, target, target, false, true]);

      // Fake the mouse-over event on the DragDrop handler to set private 
property "__validDrop" to true
      mgr._onMouseOver(event);
  }

Where the __innerControl is my own control and I do this on all non-mshtml 
browsers. Now it works perfectly, but I don't think I should have to do this. 
What are your ideas on this? I'm using Qx version 1.4.1 by the way and looking 
at upgrading to the current version so I don't know if this is already fixed 
there.

Best regards,
Jeroen

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to