Skip to content

[6.x] Improve collapsible section trigger#14758

Merged
jaygeorge merged 2 commits into
6.xfrom
improve-collapsible-section-trigger
Jun 2, 2026
Merged

[6.x] Improve collapsible section trigger#14758
jaygeorge merged 2 commits into
6.xfrom
improve-collapsible-section-trigger

Conversation

@jaygeorge
Copy link
Copy Markdown
Contributor

Description of the Problem

Collapsible sections rely on a hover state to initiate the animation, which is a neat way to prevent animations from firing off on page load. However, it's quite easy to trigger the animation snapping to 0ms if you're speeding around the CP, and moving your cursor around quickly.

What this PR Does

  • Adds a class to publish sections on first interaction. This is a small helper class, which means we don't need to rely on hover hacks
  • I've also moved the CSS into a global stylesheet, since we use the very same CSS on the form builder—so we don't need to update it in multiple places anymore

How to Reproduce

  1. Open/close collapsible sections in the publish form
  2. Quickly pull your cursor out of the section while it's animating and observe the animation abruptly end

jaygeorge added 2 commits June 2, 2026 12:15
…toggle to 0 if you move your mouse out of the area
…otherwise we would need to repeat these inline styles in the form builder
@jaygeorge jaygeorge merged commit 00608c0 into 6.x Jun 2, 2026
19 checks passed
@jaygeorge jaygeorge deleted the improve-collapsible-section-trigger branch June 2, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant