]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #5439 - Treenode expand/collapse doesn't work
authorArtur Signell <artur.signell@itmill.com>
Mon, 16 Aug 2010 12:02:03 +0000 (12:02 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 16 Aug 2010 12:02:03 +0000 (12:02 +0000)
svn changeset:14501/svn branch:6.4

src/com/vaadin/terminal/gwt/client/ui/VTree.java

index f0cde7952f11fb9eace80d5e81f4b67365c58ccf..32f4c16850cb5ca5f89fd5aac04458c432d00812 100644 (file)
@@ -643,12 +643,12 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
                  * does not have focus that the item is selected and focused.
                  * #5269
                  */
-                if (inCaption) {
+                if (getElement() == target || ie6compatnode == target) {
+                    // state change
+                    toggleState();
+                } else if (inCaption) {
                     // caption click = selection change && possible click event
-                    if (getElement() == target || ie6compatnode == target) {
-                        // state change
-                        toggleState();
-                    } else if (!readonly && selectable) {
+                    if (!readonly && selectable) {
                         if (handleClickSelection(
                                 event.getCtrlKey() || event.getMetaKey(),
                                 event.getShiftKey())) {
@@ -1516,8 +1516,9 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
      * .dom.client.BlurEvent)
      */
     public void onBlur(BlurEvent event) {
-        if (focusedNode != null)
+        if (focusedNode != null) {
             focusedNode.setFocused(false);
+        }
     }
 
     /*