Issues with Market Press Variant lightbox

I’ve chatted with you previously about my issues with the lightbox in marketpress. I found a workaround that I think should go into markepress itself.

You can see my issue on

the lightbox has to scroll vertically.

Then I noticed that the issue goes away when you select a variant.

There is a resize missing in the sequence. Adding this solved my issue:

jQuery(document).bind('cbox_complete', function(){ setTimeout(jQuery.colorbox.resize, 0);});

Just calling resize didn’t work;

But that’s a little heavy handed. I would think you could add it to:

mp_cart.initProductOptionsLightbox = function() {
$( '.mp_link-buynow' ).filter( '.mp_button-has_variations' ).colorbox( {
"close": "x",
"href": function() {
return $( this ).attr( 'data-href' );
"overlayClose": false,
"trapFocus": false,
"width": 300,
"overlayClose": true,
"escKey": true,
onLoad: function() {
$( "#colorbox" ).removeAttr( "tabindex" ); //remove tabindex before select2 init
onComplete: function() {
setTimeout($.colorbox.resize, 0);
$( "select.mp_select2" ).mp_select2( {
"dropdownCssClass": "mp_select2",
"dropdownAutoWidth": 1,
"minimumResultsForSearch": -1
} );
} );

or perhaps add an option to the presentation admin page that lets you turn on/off the extra resize.