Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brief Flash Of Unstyled DOM - AnkiDroid Only #4

Open
LoganConnor44 opened this issue Jun 17, 2021 · 0 comments
Open

Brief Flash Of Unstyled DOM - AnkiDroid Only #4

LoganConnor44 opened this issue Jun 17, 2021 · 0 comments

Comments

@LoganConnor44
Copy link
Owner

LoganConnor44 commented Jun 17, 2021

Issue

When using AnkiDroid the application flashes for a moment before each card (front and back) renders.

Library Version

1.1.48

Client

Anki Droid

Template Code Snippets To Reproduce Issue

Found Here

Possible Cause

AnkiDroid handles the WebView different than Desktop Anki. It destroys and recreates it between each and every front and back card.

Work Around

In Anki's styling section, I've added a completely black background so this will be rendered first. This does not prevent the flash of DOM, but it makes the flash less abrupt compared to a white background.

Long Term Solution

Storing or caching the web component, similar to how PWA operate. Maybe adding a service worker via StencilJs would be appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant