avoid FOUC for dark themes in applies-to widget

This commit is contained in:
tophf 2021-09-21 22:49:04 +03:00
parent 94f727dc09
commit 997f1fe8de

View File

@ -129,7 +129,7 @@ function MozSectionWidget(cm, finder = MozSectionFinder(cm)) {
update(finder.sections, []);
}
finder.on(update);
requestAnimationFrame(updateWidgetStyle);
updateWidgetStyle(); // updating in this paint frame to avoid FOUC for dark themes
cm.display.wrapper.style.setProperty('--cm-bar-width', cm.display.barWidth + 'px');
}