mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Paginator: fix changing background in Chromium
This commit is contained in:
+3
-1
@@ -1003,7 +1003,9 @@ export class Paginator extends HTMLElement {
|
|||||||
$style.textContent = style
|
$style.textContent = style
|
||||||
} else $style.textContent = styles
|
} else $style.textContent = styles
|
||||||
|
|
||||||
this.#background.style.background = getBackground(this.#view.document)
|
// NOTE: needs `requestAnimationFrame` in Chromium
|
||||||
|
requestAnimationFrame(() =>
|
||||||
|
this.#background.style.background = getBackground(this.#view.document))
|
||||||
|
|
||||||
// needed because the resize observer doesn't work in Firefox
|
// needed because the resize observer doesn't work in Firefox
|
||||||
this.#view?.document?.fonts?.ready?.then(() => this.#view.expand())
|
this.#view?.document?.fonts?.ready?.then(() => this.#view.expand())
|
||||||
|
|||||||
Reference in New Issue
Block a user