FF workaround: set position:fixed prior to appending
This commit is contained in:
parent
8f71a9f051
commit
c958186245
|
@ -356,6 +356,10 @@ const NAMED_COLORS = new Map([
|
||||||
' ' + CSS_PREFIX + 'theme-' +
|
' ' + CSS_PREFIX + 'theme-' +
|
||||||
(opt.theme === 'dark' || opt.theme === 'light' ? opt.theme :
|
(opt.theme === 'dark' || opt.theme === 'light' ? opt.theme :
|
||||||
guessTheme());
|
guessTheme());
|
||||||
|
$root.style = `
|
||||||
|
display: block !important;
|
||||||
|
position: fixed !important;
|
||||||
|
`;
|
||||||
|
|
||||||
document.body.appendChild($root);
|
document.body.appendChild($root);
|
||||||
shown = true;
|
shown = true;
|
||||||
|
@ -365,10 +369,6 @@ const NAMED_COLORS = new Map([
|
||||||
setFromHexLettercaseElement();
|
setFromHexLettercaseElement();
|
||||||
|
|
||||||
if (!isNaN(options.left) && !isNaN(options.top)) {
|
if (!isNaN(options.left) && !isNaN(options.top)) {
|
||||||
$root.style = `
|
|
||||||
display: block;
|
|
||||||
position: fixed;
|
|
||||||
`.replace(/;/g, '!important;');
|
|
||||||
reposition();
|
reposition();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user