You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might not be completely related to CCTM ..
I use the CCTM and also the "Multiple featured image" plugin, which is old but works.
The problem is that you guys use both the TB modal.
Normally when the modal is called within wordpress it adds the "modal-open" class to the body. That hides the scrollbar. One you close the modal it removes the class and makes the body scrollable.
The problem is that if I want to add a secondary featured image to the post it opens old media WP uploader in TB modal view. This action adds the "modal-open" class to the body as well. When I close the modal view it closes but it does not remove the "modal-open" class from the body.
I tried to hooked up a onclick on the close button but without luck. I found out that you use the TB modal as well and load the your thinckbox.js where you unbind from the "#TB_closeWindowButton" the click function.
So I hacked in to your thickbox.js my piece of code: jQuery("body").removeClass('modal-open');
I guess the problem might occur also in cases where you use the modal view within CCTM it self in some cases.. I'm not sure.
My question is, if it is necessary to use the unbind on the close button?
Because if not I can add mine js fix and hook it up on the close button as well without hacking your code.
thanks
The text was updated successfully, but these errors were encountered:
Yeah, if 2 plugins attempt to tie into the WP media modal window (as the CCTM does for Image or Media custom fields), I can only imagine that problems pop up -- the WP code surrounding that modal window is ugly to say the least. The more I wrestle with it, and the more bugs I file around it, the more convinced I become that the only proper solution is to write my own code to handle the modal and the management of assets.
It would be helpful if you could fork the code and submit a pull request per normal Git contributing practices.
hello
This might not be completely related to CCTM ..
I use the CCTM and also the "Multiple featured image" plugin, which is old but works.
The problem is that you guys use both the TB modal.
Normally when the modal is called within wordpress it adds the "modal-open" class to the body. That hides the scrollbar. One you close the modal it removes the class and makes the body scrollable.
The problem is that if I want to add a secondary featured image to the post it opens old media WP uploader in TB modal view. This action adds the "modal-open" class to the body as well. When I close the modal view it closes but it does not remove the "modal-open" class from the body.
I tried to hooked up a onclick on the close button but without luck. I found out that you use the TB modal as well and load the your thinckbox.js where you unbind from the "#TB_closeWindowButton" the click function.
So I hacked in to your thickbox.js my piece of code:
jQuery("body").removeClass('modal-open');
so it looks like this:
function tb_remove() { jQuery("#TB_imageOff").unbind("click"); jQuery("#TB_closeWindowButton").unbind("click"); jQuery("body").removeClass('modal-open'); // jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').unload("#TB_ajaxContent").unbind().remove();}); jQuery("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 jQuery("body","html").css({height: "auto", width: "auto"}); jQuery("html").css("overflow",""); } jQuery(document).unbind('.thickbox'); return false; }
I guess the problem might occur also in cases where you use the modal view within CCTM it self in some cases.. I'm not sure.
My question is, if it is necessary to use the unbind on the close button?
Because if not I can add mine js fix and hook it up on the close button as well without hacking your code.
thanks
The text was updated successfully, but these errors were encountered: