[ 2 posts ]

Korinne Condie

  • Username: kcondie
  • Joined: Mon Nov 02, 2009 8:19 am
  • Posts: 1
  • Offline
  • Profile

Treeview and Editing textboxes

Post Posted: Thu Nov 12, 2009 7:56 am
+0-
I have webpage which uses the treeview to display multiple tables of information. Inside the treeview there are comment sections, which are just basic html textboxes. When trying to edit these textboxes, the user cannot edit them unless they click in the textbox and hold down the mouse button while typing. If they click inside the textbox to edit it like normal, the cursor flashes in the box and then goes away. I think I may have some sort of problem with event handling, like the treeview is interfering with routine events in my html.

Any insight or help with this problem would be much appreciated. I do not have a large amount of experience with YUI, so any examples or code bits would be great as well.

Thanks!

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
Tags:

Re: Treeview and Editing textboxes

Post Posted: Thu Nov 12, 2009 9:48 am
+0-
The default behavior for a tree node is to toggle when clicked, no matter in which component within the node. To disable this behaviour, you have to return false on the clickEvent:

myTreeView.subscribe('clickEvent',function() {
return false;
});

Of course you can do more things in it, but by at least returning false, it means you are dealing with the event yourself. The node will still toggle when you click on the plus/minus sign. Also, have you noticed the labels on TextNodes are already editable?
  [ 2 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