aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebContent/VAADIN/themes/base/styles.css6
-rw-r--r--WebContent/VAADIN/themes/base/tree/tree.css2
-rw-r--r--WebContent/VAADIN/themes/liferay/styles.css6
-rw-r--r--WebContent/VAADIN/themes/reindeer/styles.css6
-rw-r--r--WebContent/VAADIN/themes/runo/styles.css6
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTree.java12
6 files changed, 20 insertions, 18 deletions
diff --git a/WebContent/VAADIN/themes/base/styles.css b/WebContent/VAADIN/themes/base/styles.css
index a0a9f657f8..7f79c050e9 100644
--- a/WebContent/VAADIN/themes/base/styles.css
+++ b/WebContent/VAADIN/themes/base/styles.css
@@ -1,5 +1,5 @@
-.v-theme-version:after {content:"6_5_5_dev-20110407";}
-.v-theme-version-6_5_5_dev-20110407 {display: none;}
+.v-theme-version:after {content:"6_5_5_dev-20110408";}
+.v-theme-version-6_5_5_dev-20110408 {display: none;}
/* Automatically compiled css file from subdirectories. */
.v-absolutelayout-wrapper {
@@ -1975,7 +1975,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 {
diff --git a/WebContent/VAADIN/themes/base/tree/tree.css b/WebContent/VAADIN/themes/base/tree/tree.css
index aa01cf7770..9e056dc4d6 100644
--- a/WebContent/VAADIN/themes/base/tree/tree.css
+++ b/WebContent/VAADIN/themes/base/tree/tree.css
@@ -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 {
diff --git a/WebContent/VAADIN/themes/liferay/styles.css b/WebContent/VAADIN/themes/liferay/styles.css
index 8b13725d0c..21573f81e5 100644
--- a/WebContent/VAADIN/themes/liferay/styles.css
+++ b/WebContent/VAADIN/themes/liferay/styles.css
@@ -1,5 +1,5 @@
-.v-theme-version:after {content:"6_5_5_dev-20110407";}
-.v-theme-version-6_5_5_dev-20110407 {display: none;}
+.v-theme-version:after {content:"6_5_5_dev-20110408";}
+.v-theme-version-6_5_5_dev-20110408 {display: none;}
/* Automatically compiled css file from subdirectories. */
.v-absolutelayout-wrapper {
@@ -1975,7 +1975,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 {
diff --git a/WebContent/VAADIN/themes/reindeer/styles.css b/WebContent/VAADIN/themes/reindeer/styles.css
index e612bf9a22..35878cbcf6 100644
--- a/WebContent/VAADIN/themes/reindeer/styles.css
+++ b/WebContent/VAADIN/themes/reindeer/styles.css
@@ -1,5 +1,5 @@
-.v-theme-version:after {content:"6_5_5_dev-20110407";}
-.v-theme-version-6_5_5_dev-20110407 {display: none;}
+.v-theme-version:after {content:"6_5_5_dev-20110408";}
+.v-theme-version-6_5_5_dev-20110408 {display: none;}
/* Automatically compiled css file from subdirectories. */
.v-absolutelayout-wrapper {
@@ -1975,7 +1975,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 {
diff --git a/WebContent/VAADIN/themes/runo/styles.css b/WebContent/VAADIN/themes/runo/styles.css
index c78cea7699..64bf9261ae 100644
--- a/WebContent/VAADIN/themes/runo/styles.css
+++ b/WebContent/VAADIN/themes/runo/styles.css
@@ -1,5 +1,5 @@
-.v-theme-version:after {content:"6_5_5_dev-20110407";}
-.v-theme-version-6_5_5_dev-20110407 {display: none;}
+.v-theme-version:after {content:"6_5_5_dev-20110408";}
+.v-theme-version-6_5_5_dev-20110408 {display: none;}
/* Automatically compiled css file from subdirectories. */
.v-absolutelayout-wrapper {
@@ -1975,7 +1975,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 {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTree.java b/src/com/vaadin/terminal/gwt/client/ui/VTree.java
index eff589cbc2..868049bfce 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTree.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTree.java
@@ -823,10 +823,6 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
DOM.sinkEvents(ie6compatnode, Event.ONCLICK);
}
- /*
- * Focus the TreeNode itself to get keyboard navigation to work.
- */
- getElement().setTabIndex(-1);
nodeCaptionDiv = DOM.createDiv();
DOM.setElementProperty(nodeCaptionDiv, "className", CLASSNAME
@@ -837,6 +833,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);
@@ -1128,7 +1130,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);