Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#1 | colorbox-javascript_error_mq_is_null_in_firefox_iframe-2242457-1.patch | 580 bytes | jay.dansand |
Comments
Comment #1
jay.dansand CreditAttribution: jay.dansand commentedHere is a patch that tests for the return value and treats an iframe the same as a "small window" (it disables Colorbox).
Comment #2
Paul B CreditAttribution: Paul B commentedComment #3
jay.dansand CreditAttribution: jay.dansand as a volunteer commentedThis 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).
Comment #4
Neslee Canil Pinto