Open mrtree1 opened 8 years ago
I ran into the same issue, but this fix didn't quite work. The solution that worked for me was to do make the backface visible like this:
$(element).css({"backface-visibility": "visible"});
Then attach a load event to the image element, which does this after the image has loaded:
$(element).css({"backface-visibility": "hidden"});
Then change the image src. Because the backface is visible during the load Chrome will redraw with the new image.
Can the issue please be reproduced in a jsfiddle perhaps?
Same issue on chrome 55 too
We spotted that the latest V49 version of Chrome causes any changes to an src attribute with backface-visibility set to hidden not to render the new image (i.e. it shows it's originally set image src, even though the src is changes in the DOM). This is a change which only occurred in Chrome 49, and I'd argue it's a bug in the browser, but to fix it I have had to wrap the code which sets backface-visibility to only operate when the browser's not Chrome.
This code is clearly put in for good reason, so I've not sent this in as a pull request. Maybe the find should be something like
:not(img)
, if it's needed for other elements only?