I’m not sure what’s going on. But the photo is not displayed, or in some cases they are shifted.
Created a post on the demo site:
I’m not sure what’s going on. But the photo is not displayed, or in some cases they are shifted.
Created a post on the demo site:
We reset try, can you reproduce this here?
testing:
There are errors in the console.
@vinothkannans can you add this to your list, looks like something is bust in spoliers.
Likely related to the new image handling code we added @sam, might be best for @eviltrout to look at it since he touched it last.
Confirmed… yeah the bug is coming from lazy loading for sure… image.parentNode
is null when it tries to switch it back in.
This was a lot more complicated than I thought it would be. The issue here is that our spoiler alert plugin replaces images with SVGs so that IE11 can blur them properly, since it doesn’t support CSS blurring. This would cause all sorts of issues with lazy loading because it could be partially loading an image which is suddenly swapped out for a SVG.
The spoiler alert plugin would also replace the SVG frequently which caused even more havoc. Here’s the fix I came up with:
https://github.com/discourse/discourse-spoiler-alert/pull/33
I didn’t merge it right away since it might be somewhat controversial - in IE11 I simply hide the image rather than blurring it. This fixes everything, and means less hacky SVG stuff to carry. The downside is a worse experience for a 5+ year old browser.
Thoughts?
Sounds totally to me! Especially if it is less code.
And it’s now merged. Let’s see if there’s any more feedback.