Skip to content

Fix :active state persistence when flex order changes during mousedown#59117

Open
servo-wpt-sync wants to merge 1 commit intoweb-platform-tests:masterfrom
servo:servo_export_43953
Open

Fix :active state persistence when flex order changes during mousedown#59117
servo-wpt-sync wants to merge 1 commit intoweb-platform-tests:masterfrom
servo:servo_export_43953

Conversation

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

When a flex item's order property changes due to :active CSS, the element moves to a new position. Servo was incorrectly clearing the :active state on every mousemove when the hit test found a different element under the cursor, causing the element to flicker instead of staying active until release.

The fix tracks which element was activated on mousedown and only clears the :active state on mouseup, matching the behavior of Firefox and Chrome.

Fixes: #43862
Reviewed in servo/servo#43953

Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Servo project.

Signed-off-by: SharanRP <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants