Merge branch 'fix-zoom-lag' into 'develop'
fix zoom being applied with a delay See merge request pleroma/pleroma-fe!2196
This commit is contained in:
commit
74b410da2b
2 changed files with 6 additions and 1 deletions
0
changelog.d/zoomlag.skip
Normal file
0
changelog.d/zoomlag.skip
Normal file
|
|
@ -50,6 +50,10 @@ export const adoptStyleSheets = throttle(() => {
|
||||||
} else {
|
} else {
|
||||||
const holder = document.getElementById('custom-styles-holder')
|
const holder = document.getElementById('custom-styles-holder')
|
||||||
|
|
||||||
|
for (let i = holder.sheet.cssRules.length - 1; i >= 0; --i) {
|
||||||
|
holder.sheet.deleteRule(i)
|
||||||
|
}
|
||||||
|
|
||||||
Object
|
Object
|
||||||
.values(stylesheets)
|
.values(stylesheets)
|
||||||
.filter(x => x.ready)
|
.filter(x => x.ready)
|
||||||
|
|
@ -128,7 +132,8 @@ export const tryLoadCache = async () => {
|
||||||
eagerStyles.ready = true
|
eagerStyles.ready = true
|
||||||
lazyStyles.ready = true
|
lazyStyles.ready = true
|
||||||
|
|
||||||
adoptStyleSheets()
|
// Don't do this, we need to wait until config adopts its styles first
|
||||||
|
//adoptStyleSheets()
|
||||||
|
|
||||||
console.info(`Loaded theme from cache`)
|
console.info(`Loaded theme from cache`)
|
||||||
return true
|
return true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue