In FireFox, window.matchMedia exists but returns null when used in a hidden iframe. As a result, colorbox.js, which tests for window.matchMedia, causes a JavaScript error when loaded in an iframe (for example, as an AJAX return into a lightbox/thickbox modal window).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jay.dansand’s picture

Here is a patch that tests for the return value and treats an iframe the same as a "small window" (it disables Colorbox).

Paul B’s picture

Status: Active » Needs review
jay.dansand’s picture

This is still relevant - it'd be great if we didn't need to keep reapplying this patch every release (the patch from #1 still applies cleanly).

Neslee Canil Pinto’s picture

Status: Needs review » Closed (cannot reproduce)