Skip to content

Commit 941a025

Browse files
javier-godoypaodb
authored andcommitted
fix: apply theme to body instead of html
1 parent 1e0ad51 commit 941a025

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ public static void applyTheme(Element element, boolean useDarkTheme) {
357357
public static void applyTheme(Element element, String theme) {
358358
VaadinSession.getCurrent().setAttribute(THEME_NAME, theme);
359359

360-
element.executeJs("document.documentElement.setAttribute('theme', $0);", theme);
360+
element.executeJs("document.body.setAttribute('theme', $0);", theme);
361361

362362
Component c = element.getComponent().get();
363363
collectThemeChangeObservers(c).forEach(observer -> observer.onThemeChange(theme));

0 commit comments

Comments
 (0)