summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-11-12 14:38:08 +0200
committerJohn Ahlroos <john@vaadin.com>2012-11-12 14:38:08 +0200
commitad096cda0475857e71451d4e3d660c11f9bc79b2 (patch)
tree959969f7fe47cf96369c3f764d329187c8986729
parentb1e30ac14f4e885d993a77e3ad077daf2a4867ce (diff)
downloadvaadin-framework-ad096cda0475857e71451d4e3d660c11f9bc79b2.tar.gz
vaadin-framework-ad096cda0475857e71451d4e3d660c11f9bc79b2.zip
Fixed row focus not removed when selecting rows in Table #10036
Change-Id: Ie9089d7d35e8c3d27f93938141c0378816e4f48e
-rw-r--r--client/src/com/vaadin/client/ui/table/VScrollTable.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html52
2 files changed, 53 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/table/VScrollTable.java b/client/src/com/vaadin/client/ui/table/VScrollTable.java
index df44f58740..066c60a2ce 100644
--- a/client/src/com/vaadin/client/ui/table/VScrollTable.java
+++ b/client/src/com/vaadin/client/ui/table/VScrollTable.java
@@ -6503,7 +6503,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
// Remove previous selection
if (focusedRow != null && focusedRow != row) {
- focusedRow.removeStyleName(getStylePrimaryName());
+ focusedRow.removeStyleName(getStylePrimaryName() + "-focus");
}
if (row != null) {
diff --git a/uitest/src/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html b/uitest/src/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html
new file mode 100644
index 0000000000..a2f57aa085
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8888/" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.table.WideSelectableTable</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstableWideSelectableTable::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[1]/domChild[6]/domChild[0]</td>
+ <td>13,15</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstableWideSelectableTable::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]/domChild[6]/domChild[0]</td>
+ <td>15,14</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstableWideSelectableTable::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[3]/domChild[6]/domChild[0]</td>
+ <td>15,12</td>
+</tr>
+<tr>
+ <td>assertNotCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentstableWideSelectableTable::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[1]</td>
+ <td>v-table-focus</td>
+</tr>
+<tr>
+ <td>assertNotCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentstableWideSelectableTable::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]</td>
+ <td>v-table-focus</td>
+</tr>
+<tr>
+ <td>assertCSSClass</td>
+ <td>vaadin=runcomvaadintestscomponentstableWideSelectableTable::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[3]</td>
+ <td>v-table-focus</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>