always scroll to the style on "history back" from editor to manager

This commit is contained in:
tophf 2017-12-13 09:19:49 +03:00
parent 8d9c7acb3c
commit 3c2421d875

View File

@ -131,7 +131,7 @@ function showStyles(styles = []) {
requestAnimationFrame(renderStyles);
return;
}
if ('scrollY' in (history.state || {})) {
if ('scrollY' in (history.state || {}) && !sessionStorage.justEditedStyleId) {
setTimeout(window.scrollTo, 0, 0, history.state.scrollY);
}
if (newUI.enabled && newUI.favicons) {