When clicking an element, :active is set on every ancestor in the event chain, not just the actual target element.
Steps to reproduce
- Run rmlui_sample_demo.
- Click any interactive element.
Expected behavior
Only the clicked element should receive :active (target phase).
Actual behavior
All ancestors receive :active as the event bubbles.
Root cause (code)
Element::ProcessDefaultAction() sets :active on mousedown without checking event phase.
Proposed fix
Only set :active for EventPhase::Target on EventId::Mousedown.
When clicking an element, :active is set on every ancestor in the event chain, not just the actual target element.
Steps to reproduce
Expected behavior
Only the clicked element should receive :active (target phase).
Actual behavior
All ancestors receive :active as the event bubbles.
Root cause (code)
Element::ProcessDefaultAction() sets :active on mousedown without checking event phase.
Proposed fix
Only set :active for EventPhase::Target on EventId::Mousedown.