[wp-trac] [WordPress Trac] #37980: Don't attach events to customizer section headings with cannot-expand class
WordPress Trac
noreply at wordpress.org
Thu Sep 8 01:50:41 UTC 2016
#37980: Don't attach events to customizer section headings with cannot-expand class
------------------------------+----------------------------------------
Reporter: celloexpressions | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Customize | Version: 4.3
Severity: normal | Keywords: needs-patch good-first-bug
Focuses: javascript |
------------------------------+----------------------------------------
Back when the customizer used `accordion.js`, the `.cannot-expand` class
could be added to section headings that couldn't be expanded to prevent JS
events and hover/focus styles from being applied. While the class
continues to prevent styles from being applied (and is used in a couple
places for core), JS events seem to be added now and those should be
removed. See
https://wordpress.slack.com/archives/themereview/p1473274466001022.
The fix should be reasonably straightforward - bailing early from
`attachEvents()` or `onChangeExpanded()` in the section JS in `customize-
controls.js` if the event target has class cannot-expand - so I'm marking
as a good first bug for now if anyone's interested in tackling it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37980>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list