From 6db8b9279e5472921c50a01f9f6654b2dc7a023f Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 25 Sep 2015 19:54:00 +0000 Subject: [PATCH] Customizer: Fix usage of `jQuery.contains()` allowing `active` state changes to again animate control visibility. Aligns usage of `jQuery.contains()` in a control's `onChangeActive` method with the existing usage in the corresponding `onChangeActive` method for panels and sections. Props nikeo. Fixes #33509. git-svn-id: https://develop.svn.wordpress.org/trunk@34557 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/customize-controls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 35f6a7bba7..e0e4a4d61c 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -1535,7 +1535,7 @@ return; } - if ( ! $.contains( document, this.container ) ) { + if ( ! $.contains( document, this.container[0] ) ) { // jQuery.fn.slideUp is not hiding an element if it is not in the DOM this.container.toggle( active ); if ( args.completeCallback ) {