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

Fix re-emptying image #3147

Merged
merged 1 commit into from Nov 9, 2021
Merged

Fix re-emptying image #3147

merged 1 commit into from Nov 9, 2021

Conversation

dmitrylyzo
Copy link
Contributor

@dmitrylyzo dmitrylyzo commented Nov 5, 2021

emptyImageElement is called twice.
The first call moves background to data-src.
The second call empties data-src.

function emptyImageElement(elem) {

This can happen because of repeated animation frame request for the same element.
requestAnimationFrame(() => {
emptyImageElement(target);
});

Changes
Fix re-emptying image

Issues
Fixes #3140

Alternatively, we could collect the affected elements into an array and request the animation frame once.
https://github.com/dmitrylyzo/jellyfin-web/tree/fix-genre-image-2

@sonarcloud
Copy link

sonarcloud bot commented Nov 5, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@thornbill thornbill merged commit 0247487 into master Nov 9, 2021
@thornbill thornbill deleted the fix-genre-image branch November 9, 2021 21:51
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

Successfully merging this pull request may close these issues.

[bug] Posters display blurred on scrolling up when displaying in "Genre" mode
2 participants