File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
cms/static/cms/js/modules Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ unreleased
9
9
* Add support for tel: and mailto: URIs in Advanced Page Settings redirect field.
10
10
* Make javascript dark mode functions available to popups as CMS.API.getColorScheme
11
11
and CMS.API.setColorScheme
12
+ * Fix bug where switching color scheme affects other settings
12
13
* Unlocalize page and node ids when rendering the page tree in the admin (#7175)
13
14
* Fixed permission denied error after page create (#6866)
14
15
Original file line number Diff line number Diff line change @@ -510,7 +510,12 @@ export const Helpers = {
510
510
setColorScheme : function ( scheme ) {
511
511
let body = $ ( 'html' ) ;
512
512
513
- this . setSettings ( { color_scheme : scheme } ) ;
513
+ if ( ! CMS . settings ) {
514
+ // Settings loaded? If not, pls. load.
515
+ this . getSettings ( ) ;
516
+ }
517
+ CMS . settings . color_scheme = scheme ;
518
+ this . setSettings ( CMS . settings ) ;
514
519
if ( scheme === 'auto' ) {
515
520
body . removeAttr ( 'data-color-scheme' ) ;
516
521
body . find ( 'div.cms iframe' ) . each ( function ( i , e ) {
You can’t perform that action at this time.
0 commit comments