Sochettra / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

DnD stops working when context menu is bound to nodes #171

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Create A dynatree
2.Enable dnd
3.Bind context menu

I am using the same context menu plugin in the samples...I can't combine the 
use of the context menu plugin and DnD....I tried binding to the title element 
of the node instead of the node itself, but then the context menu doesn't work 
until the node is first double clicked...flaky behaviour.

Original issue reported on code.google.com by ekemo...@gmail.com on 14 Jan 2011 at 3:20

GoogleCodeExporter commented 8 years ago

Original comment by moo...@wwwendt.de on 14 Jan 2011 at 4:10

GoogleCodeExporter commented 8 years ago
I am using dyna tree in our application..
When ever i am trying to combine copy paste with dnd, it is not working..
Can you please help me to over come this..

Thanks in advance.

Original comment by krishnam...@gmail.com on 18 Jan 2011 at 5:49

GoogleCodeExporter commented 8 years ago
Krishnam...replace your dynatree js with the attached patched one...then do 
this:

1.Add to your tree definition a callback : OnRender(dtnode,el)

2.In the onRender callback bind the copy/paste context menu to: 
el.getElementsByTagName('a')[0]

The above step should allow you to use both context menus and DnD.

Original comment by ekemo...@gmail.com on 18 Jan 2011 at 2:31

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, ekemo.

I also noticed that the contextmenu plugin stops propagation for all mouse 
events, even if it does not handle them.
There may be other context menu plugins that are more collaborative.

@krishnam:
You may try commenting out the two stopPropagation() calls in 
jquery.contexMenu.js. That may be worth a try too...

Original comment by moo...@wwwendt.de on 19 Jan 2011 at 6:56

GoogleCodeExporter commented 8 years ago

Original comment by moo...@wwwendt.de on 23 Jan 2011 at 8:44

GoogleCodeExporter commented 8 years ago
tree.onRender() callback was added.

Original comment by moo...@wwwendt.de on 23 Jan 2011 at 8:49

GoogleCodeExporter commented 8 years ago
Also started issue 174.

Original comment by moo...@wwwendt.de on 23 Jan 2011 at 9:44

GoogleCodeExporter commented 8 years ago
considered verified

Original comment by moo...@wwwendt.de on 17 Jul 2012 at 4:16

GoogleCodeExporter commented 8 years ago

Original comment by moo...@wwwendt.de on 17 Jul 2012 at 4:19