Umbraco Mediapicker Firefox Bugfix

This is mostly a little reminder post for myself on how to solve this issue.

The problem is when using more than one mediapicker/contentpicker on a document type, then the iframe with the treepicker will be 0px wide, rendering the box useless.

What i did was cange a line in the umbraco/js/submodal/submodal.js file

Original code from line 119:

// need to set the width of the iframe to the title bar width because of the dropshadow
// some oddness was occuring and causing the frame to poke outside the border in IE6
gPopFrame.style.width = parseInt(document.getElementById("popupTitleBar").offsetWidth, 10) + "px";
gPopFrame.style.height = (height) + "px";

Canged to

// need to set the width of the iframe to the title bar width because of the dropshadow
// some oddness was occuring and causing the frame to poke outside the border in IE6
//Bugfix for making the iframe visible in FireFox since width is 0px
bockWidth = parseInt(document.getElementById("popupTitleBar").offsetWidth, 10);
if(bockWidth > 0){
gPopFrame.style.width = bockWidth + "px";
} else {
gPopFrame.style.width = "334px";
}
gPopFrame.style.height = (height) + "px";

The problem is also posted on codeplex

Related posts

Comments

Add comment