Closed
Bug 1840116
Opened 2 years ago
Closed 2 years ago
Can't modify nested selector of constructed stylesheet in the rule view
Categories
(DevTools :: Inspector: Rules, defect, P1)
DevTools
Inspector: Rules
Tracking
(firefox116 fixed)
RESOLVED
FIXED
116 Branch
| Tracking | Status | |
|---|---|---|
| firefox116 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Steps to reproduce
- Navigate to
data:text/html,<meta charset=utf8><h1>Hello</h1><script>const s = new CSSStyleSheet();s.replaceSync("body {h1 { color: red }}");document.adoptedStyleSheets.push(s);</script> - Inspect the
Helloelement - There should be a
h1selector above the rule, modify it toh2
Expected results
The selector updates to h2
Actual results
The selector does not update and stays h1
| Assignee | ||
Comment 1•2 years ago
|
||
When updating a selector in a constructed stylesheet,
we looked through the stylesheet cssRules to properly
insert the new rule at the right position.
But for nested rules, we'd never find them, and the
modification of the selector wouldn't happen.
Depends on D181676
Updated•2 years ago
|
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b332adf20b98
[devtools] Fix modifying selector of child rule via CSSOM. r=devtools-reviewers,ochameau.
Comment 3•2 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox116:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•