Merge pull request #814 from GeertDD/fix_variation_box_toggle

Smarter toggling of the metabox for variations
This commit is contained in:
Mike Jolley 2012-03-15 06:28:06 -07:00
commit 597d3088fd
1 changed files with 4 additions and 1 deletions

View File

@ -568,7 +568,10 @@ jQuery( function($){
});
// Open/close
jQuery('.wc-metaboxes-wrapper').on('click', '.wc-metabox h3', function(){
jQuery('.wc-metaboxes-wrapper').on('click', '.wc-metabox h3', function(event){
// If the user clicks on some form input inside the h3, like a select list (for variations), the box should not be toggled
if ($(event.target).is(':input')) return;
jQuery(this).next('.wc-metabox-content').toggle();
});