"Grab a color" shows wrong color after css change
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(Not tracked)
People
(Reporter: eyalgruss, Unassigned)
Details
- open the color inspector
- observe the color of the page background eg black
- add css to body - background: red
- observe the color grab still shows black although the background is red
- close and open the color tool to make it read the correct color
Comment 1•1 year ago
|
||
We could possibly request new snapshot of a small react on every move:
https://searchfox.org/mozilla-central/rev/fb8a1b0beee7dbc1b0a35050ec5c0345f0b09173/devtools/server/actors/utils/capture-screenshot.js#118-123
The platform now exposes ways to take partial screenshots of the page.
(note that this code runs in the parent process, I don't know if that works / is exposed in content)
Comment 2•1 year ago
|
||
Technically we take a screenshot of the apge when starting the picker and don't update it until a color was selected, so it will be outdated if anything changes on the page.
It's mostly used to show the zoomed preview in the magnifier glass. We could switch to requesting a smaller screenshot and update it dynamically as the user is moving the mouse.
There might be a way to achieve this zoom effect with CSS only and avoid the screenshot as well?
| Reporter | ||
Comment 3•1 year ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #2)
Technically we take a screenshot of the apge when starting the picker and don't update it until a color was selected, so it will be outdated if anything changes on the page.
It's mostly used to show the zoomed preview in the magnifier glass. We could switch to requesting a smaller screenshot and update it dynamically as the user is moving the mouse.
There might be a way to achieve this zoom effect with CSS only and avoid the screenshot as well?
does this also explain why the zoomed preview is not updating with page scroll?
Description
•