[ 4 posts ]

Daniel Yang

  • Username: Damiel Y
  • Joined: Thu Apr 12, 2012 12:53 am
  • Posts: 6
  • Offline
  • Profile

Problem with inline editing of treeview

Post Posted: Thu May 03, 2012 11:32 pm
+0-
I have the YUI tree with inline editing supporting and reload tree button to re-create one. When I first load the page I can to edit my nodes by double click but if I click on "Reload tree" button I lose that feature. What's wrong?

http://jsfiddle.net/eric777/LKwCS/

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2016
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: Problem with inline editing of treeview

Post Posted: Fri May 04, 2012 6:36 am
+0-
As it turns out, there are several things wrong. Here is your fiddle updated.

http://jsfiddle.net/LKwCS/1/

The editor was detached from the document body when the tree was redrawn and the editor data held a reference to a node long gone. Unfortunately, there will be no further versions of YUI2, this is a clumsy patch, the real fix would require a little correction here and there.

BTW: You don't want to subscribe to the double click over and over on each redraw, since the tree is still there and the original subscription still valid.

Daniel Yang

  • Username: Damiel Y
  • Joined: Thu Apr 12, 2012 12:53 am
  • Posts: 6
  • Offline
  • Profile
Tags:

Re: Problem with inline editing of treeview

Post Posted: Fri May 04, 2012 9:02 pm
+0-
Thank you for the help.
Do you know why that solution doesn't work in IE at all?

Satyam

YUI Contributor

  • Username: Satyam
  • Joined: Tue Dec 09, 2008 12:34 am
  • Posts: 2016
  • Location: Sitges, Spain
  • GitHub: Satyam
  • Gists: Satyam
  • IRC: DevaSatyam
  • YUI Developer
  • Offline
  • Profile

Re: Problem with inline editing of treeview

Post Posted: Sat May 05, 2012 2:38 am
+0-
This is a better patch:

https://gist.github.com/2601422

Replace the patch I suggested in my previous post since it is contained within this.
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum