color picker: Fix colorpicker stream settings.

This color picker did not hide even after exiting stream settings.

Fix by adding logic to auto-close any open color pickers when closing
stream settings.

Tweaked by tabbott to use the existing on-close handler, which is
important if one clicks outside the modal or otherwise navigates
another way.

Fixes #17334.
This commit is contained in:
yasiruRathnayaka97 2021-03-09 07:09:29 +00:00 committed by Tim Abbott
parent f0e655f1d8
commit abcfd40b29
1 changed files with 1 additions and 0 deletions

View File

@ -743,6 +743,7 @@ export function launch(section) {
overlay: $("#subscription_overlay"),
on_close() {
browser_history.exit_overlay();
$(".colorpicker").spectrum("destroy");
},
});
change_state(section);