From 997f1fe8de8d58740efdd8ff2436c2e8db7476dc Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 21 Sep 2021 22:49:04 +0300 Subject: [PATCH] avoid FOUC for dark themes in applies-to widget --- edit/moz-section-widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit/moz-section-widget.js b/edit/moz-section-widget.js index 5588febc..2bd91c3a 100644 --- a/edit/moz-section-widget.js +++ b/edit/moz-section-widget.js @@ -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'); }