My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 173: Context menu is not bound to nodes that are hidden by collapsed node on load
1 person starred this issue and may be notified of changes. Back to list
Status:  Verified
Owner:  ----
Closed:  Jan 2011


 
Reported by jonas.ba...@gmail.com, Jan 19, 2011
I'm using Firefox 3.6.13 on Linux but also seems to be the same problem on Windows with Firefox and IE8 (haven't tried anything else). If you use the example Dynatree project with the context menu example, it shows the same characteristics. Load the page with the folders in a collapsed state and then expand and try to invoke the context menu on the nodes that were hidden - the standard browser context menu comes up. Load the page again with the nodes open (since the example has persistence), and the nodes that are visible at load time all have the context menu bound to them and it is invokable. I've also tried it with jeegoocontext and that has the same problem - binding of the context menu only happens to nodes that are not hidden at page load time.
Jan 19, 2011
Project Member #1 moo...@wwwendt.de
That is to be expected, since qua design the node HTML elements do not exist until they are rendered the first time.
These possible solutions come to my mind:
- isn't that what live events where made for?
  I wonder why these plugins do not use live events or event delegation...
- ekemo suggested a workaround in  issue 171 . I will include his 'onRender' 
  patch in version 1.0.4
- I am thinking of adding a tree.renderAll() function, that would create all 
  elements, so you can bind. (This wouldn't help with lazy loading trees however)

Status: Accepted
Labels: Milestone-Release1.0.4
Jan 20, 2011
#2 jonas.ba...@gmail.com
It might be useful to have a method that would allow you to render down from a specific node that would deal with lazy loading. I don't know how feasible that would be to implement, but then at least you could render only that part of the tree after the lazy load.
Jan 20, 2011
Project Member #3 moo...@wwwendt.de
The idea would be to have a node.renderChildren() function - or alike - that the user can call in the onLazyRead handler.
(tree.renderAll() would be implemented as tree.rootNode.renderChildren())
Jan 23, 2011
Project Member #4 moo...@wwwendt.de
(No comment was entered for this change.)
Labels: Milestone-Release1.1.0
Jan 23, 2011
Project Member #5 moo...@wwwendt.de
New method tree.renderInvisibleNodes() forces creation of all HTML elements.
node.render() has new argument includeInvisible. 
Status: Fixed
Jan 23, 2011
Project Member #6 moo...@wwwendt.de
Also started  issue 174 .
Jul 17, 2012
Project Member #7 moo...@wwwendt.de
considered verified
Jul 17, 2012
Project Member #8 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Verified

Powered by Google Project Hosting