[about:addons] Fix size detection for preview images
Categories
(Toolkit :: Add-ons Manager, defect, P1)
Tracking
()
People
(Reporter: robwu, Assigned: robwu)
References
Details
Attachments
(2 files)
The size for theme preview images is computed using getComputedStyle
: https://searchfox.org/mozilla-central/rev/d80f0a570736dce76a2eb184fb65517462089e8a/toolkit/mozapps/extensions/content/aboutaddons.js#410
But because the image is initially empty (and possibly not even part of the DOM yet!), the resulting size is 0, so the logic will fall back to the first screenshot in the list.
This can result in selecting the incorrect image for theme previews.
Note that the cards have a fixed width, so the fix could be as simple as using a fixed number (or deriving it from a CSS variable).
There have been some attempts to change the size, from 680 to 720, but we're apparently back at 680 now:
Assignee | ||
Comment 1•5 years ago
|
||
Comment 3•5 years ago
|
||
Hi Rob, i mentioned https://bugzilla.mozilla.org/show_bug.cgi?id=1546248#c11 that this got backed out, not sure if you noticed.
Comment 5•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
This issue is verified as fixed on Firefox 69.0a1 (20190521094447) and Firefox 68.0b3 (20190520131124) under Win 7 64-bit and Mac OS X 10.14.1.
Please see the attached screenshot.
Description
•