SharePoint 2013 uses iframes for the popups which causes issues when using a modified masterpage. The iframe has a class of .ms-dlgFrame and the element I am trying to hide is .navbar. I have tried using CSS with,
.ms-dlgFrame .navbar {
display: none;
}
but it did not work. Using javascipt I am able to tell if the iframe class exists but when I try to hide the navbar it hides the navbar on the main page instead of the popup. The javascript I am using is,
if (document.getElementsByClassName('ms-dlgFrame').length) {
document.getElementsByClassName('navbar')[0].style.Display='none';
}
How can I hide the navbar on the popup but not the main page?