Rollup merge of #63782 - GuillaumeGomez:theme-switch-fix, r=kinnison
Fix confusion in theme picker functions To reproduce the bug currently: click on the theme picker button twice (to show it then hide it). Then click anywhere else: the dropdown menu appears again. The problem was coming from a confusion of what the `hideThemeButtonState` and `showThemeButtonState` were supposed to do. I switched their codes and updated the `switchThemeButtonState` function. It now works as expected. r? @kinnison
This commit is contained in:
commit
1f56441a00
2 changed files with 14 additions and 14 deletions
|
@ -876,22 +876,22 @@ r#"var themes = document.getElementById("theme-choices");
|
|||
var themePicker = document.getElementById("theme-picker");
|
||||
|
||||
function showThemeButtonState() {{
|
||||
themes.style.display = "none";
|
||||
themePicker.style.borderBottomRightRadius = "3px";
|
||||
themePicker.style.borderBottomLeftRadius = "3px";
|
||||
}}
|
||||
|
||||
function hideThemeButtonState() {{
|
||||
themes.style.display = "block";
|
||||
themePicker.style.borderBottomRightRadius = "0";
|
||||
themePicker.style.borderBottomLeftRadius = "0";
|
||||
}}
|
||||
|
||||
function hideThemeButtonState() {{
|
||||
themes.style.display = "none";
|
||||
themePicker.style.borderBottomRightRadius = "3px";
|
||||
themePicker.style.borderBottomLeftRadius = "3px";
|
||||
}}
|
||||
|
||||
function switchThemeButtonState() {{
|
||||
if (themes.style.display === "block") {{
|
||||
showThemeButtonState();
|
||||
}} else {{
|
||||
hideThemeButtonState();
|
||||
}} else {{
|
||||
showThemeButtonState();
|
||||
}}
|
||||
}};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue