From f761aadb1a6f8bdaceb9e1e76d1ee7767614de25 Mon Sep 17 00:00:00 2001 From: eight Date: Tue, 5 Feb 2019 11:21:45 +0800 Subject: [PATCH] Fix: transition patch is broken --- content/apply.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/apply.js b/content/apply.js index fb62aa68..c42f160b 100644 --- a/content/apply.js +++ b/content/apply.js @@ -67,7 +67,7 @@ const APPLY = (() => { .then(() => { // CSS transition bug workaround: since we insert styles asynchronously, // the browsers, especially Firefox, may apply all transitions on page load - if (Object.values(result).some(s => s.code.includes('transition'))) { + if (styleInjector.list.some(s => s.code.includes('transition'))) { applyTransitionPatch(); } }) @@ -351,7 +351,7 @@ const APPLY = (() => { document.documentElement.classList.add(className); const el = styleInjector.createStyle('transition-patch'); document.documentElement.appendChild(el); - setStyleContent(` + setStyleContent(el, ` ${docId}.${CSS.escape(className)}:root * { transition: none !important; }