]> source.dussan.org Git - vaadin-framework.git/commitdiff
merging fixes from 6.5
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Apr 2011 07:43:49 +0000 (07:43 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Apr 2011 07:43:49 +0000 (07:43 +0000)
svn changeset:18406/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/window/HugeWindowShouldBeClosable.java

index aba8b887458faa8431d3f65fef4117248ed3c2f2..b726023e81689437092282e466d6e9110a169a4e 100644 (file)
@@ -1972,7 +1972,7 @@ textarea.v-textarea-readonly:focus {
        background: transparent url(common/img/sprites.png) no-repeat 5px -37px;
        padding: 1px 0;
 }
-.v-tree-node:focus {
+.v-tree-node-caption:focus {
        outline: none;
 }
 .v-tree-node-expanded {
index aa01cf7770df449523a8bc209b8979a85cb79bbd..9e056dc4d62e9f2483d5f0ba83ced180ddc0589b 100644 (file)
@@ -8,7 +8,7 @@
        background: transparent url(../common/img/sprites.png) no-repeat 5px -37px;
        padding: 1px 0;
 }
-.v-tree-node:focus {
+.v-tree-node-caption:focus {
        outline: none;
 }
 .v-tree-node-expanded {
index 87fc79aab3a03ef2ffa5ab6bae29b7dd6bf5baa9..7929641b83d484de1f742cc690800bcb774f7d1e 100644 (file)
@@ -1972,7 +1972,7 @@ textarea.v-textarea-readonly:focus {
        background: transparent url(../base/common/img/sprites.png) no-repeat 5px -37px;
        padding: 1px 0;
 }
-.v-tree-node:focus {
+.v-tree-node-caption:focus {
        outline: none;
 }
 .v-tree-node-expanded {
index 58a518ca0d1b09e2be2d1c23a3b562126d935727..da73b51881fcccda944b7c3787f5d22353f8f671 100644 (file)
@@ -1972,7 +1972,7 @@ textarea.v-textarea-readonly:focus {
        background: transparent url(../base/common/img/sprites.png) no-repeat 5px -37px;
        padding: 1px 0;
 }
-.v-tree-node:focus {
+.v-tree-node-caption:focus {
        outline: none;
 }
 .v-tree-node-expanded {
index dcf99329f6f007b6419f539d6adaadd1d0c23243..a9fb712eb22b5c734be47a5511ffbd9bfbc4db9c 100644 (file)
@@ -1972,7 +1972,7 @@ textarea.v-textarea-readonly:focus {
        background: transparent url(../base/common/img/sprites.png) no-repeat 5px -37px;
        padding: 1px 0;
 }
-.v-tree-node:focus {
+.v-tree-node-caption:focus {
        outline: none;
 }
 .v-tree-node-expanded {
index fb426d58cbb33376c1fce81b022045e59dd13ba0..43915af3c90c1a6ca964633f358a9f0e239bdffe 100644 (file)
@@ -625,19 +625,6 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
             // always when clicking an item, focus it
             setFocusedNode(this, false);
 
-            /*
-             * 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
-
             ScheduledCommand command = new ScheduledCommand() {
                 public void execute() {
 
@@ -810,7 +797,6 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
                 } else {
                     focusedNode.setFocused(true);
                 }
-                // focus();
             }
             final MouseEventDetails details = new MouseEventDetails(evt);
             ScheduledCommand command = new ScheduledCommand() {
@@ -855,15 +841,7 @@ 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);
-            // }
+            }
 
             nodeCaptionDiv = DOM.createDiv();
             DOM.setElementProperty(nodeCaptionDiv, "className", CLASSNAME
@@ -874,6 +852,12 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
             DOM.appendChild(nodeCaptionDiv, wrapper);
             DOM.appendChild(wrapper, nodeCaptionSpan);
 
+            /*
+             * Focus the caption div of the node to get keyboard navigation to
+             * work without scrolling up or down when focusing a node.
+             */
+            nodeCaptionDiv.setTabIndex(-1);
+
             childNodeContainer = new FlowPanel();
             childNodeContainer.setStyleName(CLASSNAME + "-children");
             setWidget(childNodeContainer);
@@ -1165,7 +1149,7 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
                     ie6compatnode.addClassName(CLASSNAME_FOCUSED);
                 }
                 this.focused = focused;
-                getElement().focus();
+                nodeCaptionDiv.focus();
                 treeHasFocus = true;
             } else if (this.focused && !focused) {
                 nodeCaptionDiv.removeClassName(CLASSNAME_FOCUSED);
index 30757735ed0267ed6785f27d45e5b6cd68e3aab3..3b8067c726be0d9b40badad91deaf67ae8c6a2c2 100644 (file)
@@ -21,7 +21,7 @@ public class HugeWindowShouldBeClosable extends TestBase {
 
     @Override
     protected Integer getTicketNumber() {
-        return -1;
+        return 6784;
     }
 
 }