]> source.dussan.org Git - vaadin-framework.git/commitdiff
merging fixes from 6.5
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Apr 2011 07:27:15 +0000 (07:27 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Apr 2011 07:27:15 +0000 (07:27 +0000)
svn changeset:18402/svn branch:6.6

WebContent/VAADIN/themes/base/styles.css
WebContent/VAADIN/themes/base/tree/tree.css
WebContent/VAADIN/themes/liferay/styles.css
WebContent/VAADIN/themes/reindeer/styles.css
WebContent/VAADIN/themes/runo/styles.css
src/com/vaadin/terminal/gwt/client/ui/VTree.java
tests/src/com/vaadin/tests/components/tree/TreeScrollingOnSelection.java

index 875df0b097439401f71997a53fc78cda80808273..aba8b887458faa8431d3f65fef4117248ed3c2f2 100644 (file)
@@ -1,5 +1,5 @@
-.v-theme-version:after {content:"6_5_4_dev-20110324";}
-.v-theme-version-6_5_4_dev-20110324 {display: none;}
+.v-theme-version:after {content:"6_5_5_dev-20110406";}
+.v-theme-version-6_5_5_dev-20110406 {display: none;}
 /* Automatically compiled css file from subdirectories. */
 
 .v-absolutelayout-wrapper {
@@ -1972,6 +1972,9 @@ textarea.v-textarea-readonly:focus {
        background: transparent url(common/img/sprites.png) no-repeat 5px -37px;
        padding: 1px 0;
 }
+.v-tree-node:focus {
+       outline: none;
+}
 .v-tree-node-expanded {
        background-position: -5px -10px;
 }
index f549d1961dd7e33e87e8d3bb4490f46762f1d7da..aa01cf7770df449523a8bc209b8979a85cb79bbd 100644 (file)
@@ -8,6 +8,9 @@
        background: transparent url(../common/img/sprites.png) no-repeat 5px -37px;
        padding: 1px 0;
 }
+.v-tree-node:focus {
+       outline: none;
+}
 .v-tree-node-expanded {
        background-position: -5px -10px;
 }
index fdf7ee25a7487803d0bed00ae58bf619d2abf1ea..87fc79aab3a03ef2ffa5ab6bae29b7dd6bf5baa9 100644 (file)
@@ -1972,6 +1972,9 @@ textarea.v-textarea-readonly:focus {
        background: transparent url(../base/common/img/sprites.png) no-repeat 5px -37px;
        padding: 1px 0;
 }
+.v-tree-node:focus {
+       outline: none;
+}
 .v-tree-node-expanded {
        background-position: -5px -10px;
 }
index f98930f5ea6876963b1e1c6078ce83bb899254c5..58a518ca0d1b09e2be2d1c23a3b562126d935727 100644 (file)
@@ -1972,6 +1972,9 @@ textarea.v-textarea-readonly:focus {
        background: transparent url(../base/common/img/sprites.png) no-repeat 5px -37px;
        padding: 1px 0;
 }
+.v-tree-node:focus {
+       outline: none;
+}
 .v-tree-node-expanded {
        background-position: -5px -10px;
 }
index 0ea34555e5ea732d1982e70a3c7e220660f848f8..dcf99329f6f007b6419f539d6adaadd1d0c23243 100644 (file)
@@ -1972,6 +1972,9 @@ textarea.v-textarea-readonly:focus {
        background: transparent url(../base/common/img/sprites.png) no-repeat 5px -37px;
        padding: 1px 0;
 }
+.v-tree-node:focus {
+       outline: none;
+}
 .v-tree-node-expanded {
        background-position: -5px -10px;
 }
index 71e4b1ec03860843ffc73ccb2c72ab7641cb383c..fb426d58cbb33376c1fce81b022045e59dd13ba0 100644 (file)
@@ -629,15 +629,14 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
              * Also ensure that the Tree itself is also gains focus (TreeNodes
              * focus is kind of faked).
              */
-            if (BrowserInfo.get().isOpera()) {
-                /*
-                 * focusing the tree in Opera would scroll long trees up on
-                 * clicks
-                 */
-                getElement().focus();
-            } else if (!BrowserInfo.get().isIE()) {
-                focus();
-            } // else if IE: NOP, IE will give the focus to Tree anyways
+            // if (BrowserInfo.get().isOpera()) {
+            /*
+             * focusing the tree in Opera would scroll long trees up on clicks
+             */
+            // getElement().focus();
+            // } else if (!BrowserInfo.get().isIE()) {
+            // focus();
+            // } // else if IE: NOP, IE will give the focus to Tree anyways
 
             ScheduledCommand command = new ScheduledCommand() {
                 public void execute() {
@@ -806,7 +805,12 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
              * previously modified field may contain dirty variables.
              */
             if (!treeHasFocus) {
-                focus();
+                if (focusedNode == null) {
+                    getNodeByKey(key).setFocused(true);
+                } else {
+                    focusedNode.setFocused(true);
+                }
+                // focus();
             }
             final MouseEventDetails details = new MouseEventDetails(evt);
             ScheduledCommand command = new ScheduledCommand() {
@@ -851,15 +855,15 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
                 DOM.appendChild(getElement(), ie6compatnode);
 
                 DOM.sinkEvents(ie6compatnode, Event.ONCLICK);
-            } else if (BrowserInfo.get().isOpera()) {
-                /*
-                 * We need to focus the TreeNode itself to get keyboard
-                 * navigation to work in opera at some level. Actually focusing
-                 * individual TreeNodes would most likely be better option for
-                 * all browsers, I don't dare to to this at bugfix release. MT.
-                 */
-                getElement().setTabIndex(-1);
-            }
+            } // else if (BrowserInfo.get().isOpera()) {
+            /*
+             * We need to focus the TreeNode itself to get keyboard navigation
+             * to work in opera at some level. Actually focusing individual
+             * TreeNodes would most likely be better option for all browsers, I
+             * don't dare to to this at bugfix release. MT.
+             */
+            getElement().setTabIndex(-1);
+            // }
 
             nodeCaptionDiv = DOM.createDiv();
             DOM.setElementProperty(nodeCaptionDiv, "className", CLASSNAME
@@ -1161,12 +1165,15 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
                     ie6compatnode.addClassName(CLASSNAME_FOCUSED);
                 }
                 this.focused = focused;
+                getElement().focus();
+                treeHasFocus = true;
             } else if (this.focused && !focused) {
                 nodeCaptionDiv.removeClassName(CLASSNAME_FOCUSED);
                 if (BrowserInfo.get().isIE6()) {
                     ie6compatnode.removeClassName(CLASSNAME_FOCUSED);
                 }
                 this.focused = focused;
+                treeHasFocus = false;
             }
         }
 
index 0f06f23fe0655228b33ad53feee3976089005b0a..42c9087fc3e553c7fd5491651cf4e2204957d69e 100644 (file)
@@ -33,6 +33,7 @@ public class TreeScrollingOnSelection extends TestBase {
                 charLabel.setValue(event.getItemId().toString());
             }
         });
+        tree.setImmediate(true);
 
         Panel panel = new Panel();
         panel.setScrollable(true);