avoid forced layout in highlightEditedStyle

This commit is contained in:
tophf 2021-01-07 14:51:02 +03:00
parent 767b2017e0
commit 11d311d1e8

View File

@ -358,7 +358,7 @@ function showStyles(styles = [], matchUrlIds) {
} }
setTimeout(getFaviconSrc); setTimeout(getFaviconSrc);
if (sessionStore.justEditedStyleId) { if (sessionStore.justEditedStyleId) {
highlightEditedStyle(); setTimeout(highlightEditedStyle); // delaying to avoid forced layout
} else if ('scrollY' in (history.state || {})) { } else if ('scrollY' in (history.state || {})) {
setTimeout(window.scrollTo, 0, 0, history.state.scrollY); setTimeout(window.scrollTo, 0, 0, history.state.scrollY);
} }