aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-01-08 15:29:52 +0200
committerJohn Ahlroos <john@vaadin.com>2013-01-08 15:29:52 +0200
commite22dd3f3db39b8bd067600c414c6c889ab35cd3e (patch)
tree3fd9f234e47f041ead116409cd20ad01b6493380
parent68406d87bb4dfb90d460ac02ef6412493f76eba7 (diff)
downloadvaadin-framework-e22dd3f3db39b8bd067600c414c6c889ab35cd3e.tar.gz
vaadin-framework-e22dd3f3db39b8bd067600c414c6c889ab35cd3e.zip
Fixes issue where close indicator becomes invisible for tabs without an icon in Firefox using the minimal style for the tabsheet #10616
Change-Id: I0dfd5af048d34d3f0671a40b22aed273ca0b0581
-rw-r--r--WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss2
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html27
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.java44
3 files changed, 72 insertions, 1 deletions
diff --git a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss
index 75ce9e1094..a3c8afdcf4 100644
--- a/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss
+++ b/WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-minimal-style.scss
@@ -107,7 +107,7 @@
.#{$primaryStyleName}-tabs-minimal .#{$primaryStyleName}-caption-close {
margin-top: 1px;
}
-.v-ff & .#{$primaryStyleName}-tabs-minimal .#{$primaryStyleName}-caption-close {
+.v-ff & .#{$primaryStyleName}-tabs-minimal .v-icon + .#{$primaryStyleName}-caption-close {
margin-top: -15px;
}
.#{$primaryStyleName}-tabs-minimal .#{$primaryStyleName}-caption-close:hover,
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html
new file mode 100644
index 0000000000..799e844e04
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.html
@@ -0,0 +1,27 @@
+<?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.tabsheet.TabsheetMinimalClosableTabs?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.java b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.java
new file mode 100644
index 0000000000..ebfee0adb0
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/TabsheetMinimalClosableTabs.java
@@ -0,0 +1,44 @@
+package com.vaadin.tests.components.tabsheet;
+
+import com.vaadin.server.ExternalResource;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.TabSheet;
+import com.vaadin.ui.TabSheet.Tab;
+import com.vaadin.ui.themes.Reindeer;
+
+public class TabsheetMinimalClosableTabs extends TestBase {
+
+ @Override
+ protected void setup() {
+ TabSheet ts = new TabSheet();
+ for (int tab = 0; tab < 5; tab++) {
+ String tabCaption = "Tab";
+ for (int c = 0; c < tab; c++) {
+ tabCaption += tabCaption;
+ }
+ tabCaption += " " + tab;
+
+ Tab t = ts.addTab(new Label("Content " + tab), tabCaption);
+ t.setClosable(true);
+
+ if (tab % 2 == 0) {
+ t.setIcon(new ExternalResource(
+ "/VAADIN/themes/tests-tickets/icons/fi.gif"));
+ }
+ }
+
+ ts.addStyleName(Reindeer.TABSHEET_MINIMAL);
+ addComponent(ts);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Minimal theme should also show the close button in all browsers";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 10610;
+ }
+}