Skip to content

Commit

Permalink
BlurUp-Plugin: Copy style attribute (fixes #746)
Browse files Browse the repository at this point in the history
  • Loading branch information
aFarkas committed May 17, 2020
1 parent c792554 commit 47909c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/blur-up/ls.blur-up.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
blurImg.addEventListener('error', onloadBlurUp);

blurImg.className = 'ls-blur-up-img';
blurImg.style = img.style;
blurImg.src = src;
blurImg.alt = '';
blurImg.setAttribute('aria-hidden', 'true');
Expand Down

1 comment on commit 47909c1

@dhymik
Copy link

@dhymik dhymik commented on 47909c1 May 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work. Line 87:

blurImg.style = img.style;

needs to be replaced with with

blurImg.style.cssText = img.style.cssText;

then it works as expected.

Please sign in to comment.