Open
Bug 1911377
Opened 4 months ago
Updated 4 months ago
Pseudo-class lock not cleared when element is mutated
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(Not tracked)
NEW
People
(Reporter: sebo, Unassigned)
References
Details
As described by Brian Grinstead in a related bug, the pseudo-class locks are currently not cleared when an element is manipulated, e.g. moved within the DOM. This is especially an issue for pseudo-classes that affect the ancestor chain like :hover
and :active
, as the pseudo-class lock may then incorrectly apply to them.
Example:
- Inspect the 'child' element on https://jsfiddle.net/SebastianZ/fon397sk/
- Set the
:hover
pseudo-lock on it - Press
m
on the keyboard
⇒ appends the child to the <body>
. OK
⇒ pseudo-class lock still applies to the 'parent' element. FAIL
As noted by Brian, a solution to this could be to keep track of the elements having explicit locks, clearing them when the elements are mutated, and then reapplying them if the elements are still in the DOM.
Sebastian
You need to log in
before you can comment on or make changes to this bug.
Description
•