Images are flashing when updates by img.src[]=url in Firefox >= 8.0
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
People
(Reporter: tania.joukova, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(5 files)
Comment 1•13 years ago
|
||
Comment 3•13 years ago
|
||
Comment 7•13 years ago
|
||
Comment 8•13 years ago
|
||
Comment 9•13 years ago
|
||
Comment 10•13 years ago
|
||
Updated•13 years ago
|
Comment 11•13 years ago
|
||
Comment 12•13 years ago
|
||
Comment 13•13 years ago
|
||
Comment 14•13 years ago
|
||
Comment 15•13 years ago
|
||
Comment 16•13 years ago
|
||
Comment 17•13 years ago
|
||
Comment 18•13 years ago
|
||
Comment 19•13 years ago
|
||
Comment 20•13 years ago
|
||
Comment 22•13 years ago
|
||
Comment 23•12 years ago
|
||
Comment 24•12 years ago
|
||
Comment 25•12 years ago
|
||
Comment 26•10 years ago
|
||
Updated•10 years ago
|
Comment 27•10 years ago
|
||
Comment 28•10 years ago
|
||
Comment 29•10 years ago
|
||
Comment 30•10 years ago
|
||
Comment 31•10 years ago
|
||
Comment 32•10 years ago
|
||
Comment 33•10 years ago
|
||
Comment 34•10 years ago
|
||
Comment 35•9 years ago
|
||
Comment 36•9 years ago
|
||
Comment 37•9 years ago
|
||
Comment 38•9 years ago
|
||
Comment 39•9 years ago
|
||
Comment 40•8 years ago
|
||
Comment 41•8 years ago
|
||
Comment 42•6 years ago
|
||
Comment 43•3 years ago
|
||
I've found a pretty solid work-around for this, which is to basically create a temporary image with the new image URL, wait until decode is done on that temporary image, and only then replace the src
of the actual DOM element, like this:
const imgUrl = 'yournewimage.png'; // your new image
const img = new Image(); // create temporary image
img.src = imgUrl; // add your new image as src on the temporary image
img.decode().then(() => { // wait until temporary image is decoded
document.querySelector('img').src = imgUrl; // replace your actual element now
});
However keep in mind that it made the whole thing lag a lot in Chrome, so I only added this decode()
thing for Firefox by checking that navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
would be true
.
Hope this helps someone!
Updated•2 years ago
|
Comment 44•2 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 18 votes.
:aosmond, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Comment 45•2 years ago
|
||
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
Description
•