diff --git a/vendor-overwrites/colorpicker/colorpicker.js b/vendor-overwrites/colorpicker/colorpicker.js index c03e9e7e..511a08dd 100644 --- a/vendor-overwrites/colorpicker/colorpicker.js +++ b/vendor-overwrites/colorpicker/colorpicker.js @@ -197,6 +197,12 @@ $formatChangeButton.title = opt.tooltipForSwitcher || ''; opt.hideDelay = Math.max(0, opt.hideDelay) || 2000; + $root.classList.add(CSS_PREFIX + 'theme-' + + (opt.theme === 'dark' || opt.theme === 'light' ? + opt.theme : + guessTheme())); + document.body.appendChild($root); + if (!isNaN(options.left) && !isNaN(options.top)) { $root.style = ` display: block; @@ -205,12 +211,6 @@ reposition(); } - $root.classList.add(CSS_PREFIX + 'theme-' + - (opt.theme === 'dark' || opt.theme === 'light' ? - opt.theme : - guessTheme())); - document.body.appendChild($root); - shown = true; registerEvents();