Media color scheme simulation is turned off when closing RDM
Categories
(DevTools :: Responsive Design Mode, defect)
Tracking
(firefox89 fixed)
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(1 file)
Steps to reproduce
- Go to https://firefox-devtools-color-scheme-sim.glitch.me/
- Open the inspector and click on the moon icon to simulate dark mode
- Enable RDM (color simulation is still on)
- Close RDM
Expected results
Color simulation is still applied
Actual results
Color simulation isn't applied (going back to default light mode), even if the icon is still toggled.
Assignee | ||
Comment 1•4 years ago
|
||
This is due to the fact that closing RDM will lead to its associated commands instance being destroyed, which destroy the descriptor, which will destroy the browsingContext target, where we reset the color scheme simulation (devtools/server/actors/targets/browsing-context.js#1022,1031 -> devtools/server/actors/targets/browsing-context.js#1302,1308 )
Assignee | ||
Comment 2•4 years ago
|
||
Since RDM spawn a new browsing context target, closing it
was restoring the taret configuration, which meant disabling
any color-scheme simulation that might have been enabled.
This patch introduces a flag that is set when the color scheme
simulation is set, and that will be checked before disabling
it when the target is destroyed.
This way, the simulation is only disabled when the actual target
that was used to set it is destroyed (i.e. the toolbox target).
A test is added to check that the original issue with RDM is resolved.
Updated•4 years ago
|
Comment 4•4 years ago
|
||
bugherder |
Description
•