diff --git a/js/colorbox.js b/js/colorbox.js index ace202e..e0bd810 100644 --- a/js/colorbox.js +++ b/js/colorbox.js @@ -9,7 +9,9 @@ Drupal.behaviors.initColorbox = { if (settings.colorbox.mobiledetect && window.matchMedia) { // Disable Colorbox for small screens. var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")"); - if (mq.matches) { + // In FireFox, window.matchMedia exists but returns null when used in a + // hidden iframe. + if (mq == null || mq.matches) { return; } }