1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Android: Fix clicking "Draw picture" results in blank screen with very old WebView versions (#11604)

This commit is contained in:
Henry Heino
2025-01-08 04:29:47 -08:00
committed by GitHub
parent a9e1be944f
commit 633d87ebfe
5 changed files with 21 additions and 6 deletions

View File

@ -0,0 +1,11 @@
// .replaceChildren is not supported in Chromium 83, which is the default for Android 11
// (unless auto-updated from the Google Play store).
HTMLElement.prototype.replaceChildren ??= function(this: HTMLElement, ...nodes: Node[]) {
while (this.children.length) {
this.children[0].remove();
}
for (const node of nodes) {
this.appendChild(node);
}
};