Skip to content

Commit e8a6618

Browse files
javier-godoypaodb
authored andcommitted
fix: update color-scheme when switching themes
1 parent 3ba12aa commit e8a6618

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/com/flowingcode/vaadin/addons/demo/TabbedDemo.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,10 @@ public static void applyThemeAttribute(Element element, String theme) {
340340
script = "let e = document.documentElement;";
341341
}
342342

343-
script += "e.setAttribute('theme', $0);";
343+
script += """
344+
e.setAttribute('theme', $0);
345+
e.style.colorScheme = $0;
346+
""";
344347

345348
element.executeJs(script, theme);
346349

0 commit comments

Comments
 (0)