From ad096cda0475857e71451d4e3d660c11f9bc79b2 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Mon, 12 Nov 2012 14:38:08 +0200 Subject: [PATCH] Fixed row focus not removed when selecting rows in Table #10036 Change-Id: Ie9089d7d35e8c3d27f93938141c0378816e4f48e --- .../vaadin/client/ui/table/VScrollTable.java | 2 +- .../RowFocusAppliedAndRemovedOnSelection.html | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 uitest/src/com/vaadin/tests/components/table/RowFocusAppliedAndRemovedOnSelection.html 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 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.components.table.WideSelectableTable
mouseClickvaadin=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]13,15
mouseClickvaadin=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]15,14
mouseClickvaadin=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]15,12
assertNotCSSClassvaadin=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]v-table-focus
assertNotCSSClassvaadin=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]v-table-focus
assertCSSClassvaadin=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]v-table-focus
+ + -- 2.39.5