2 Replies Latest reply on Sep 16, 2008 1:54 PM by Newsgroup_User

    Single-click on a Tree not cancelable

    Marc Missire
      Hi,

      I have a component that includes a Tree, and the Tree uses a custom TreeItemRenderer. The render extends the default one, and adds a small graphic next to each Tree node's label.

      If users click the graphic, I'd like to prevent the default single-click behavior of the tree. For example, I'd like to prevent the node being selected.

      I've found that MouseEvent.CLICK is not cancelable, so preventDefault() has no effect.

      Is there a way to prevent the Tree from reacting to the single click, if the single-click is on the graphic in my item renderer?