Making WordPress.org


Ignore:
Timestamp:
02/24/2022 06:45:52 AM (4 years ago)
Author:
dd32
Message:

Trac: oEmbed API: Properly detect the height of the Trac page.

Previously the lower ~1em of the page was being missed due to hidden padding on html/body rather than the content element.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/dotorg/trac/oembed/index.php

    r11599 r11600  
    258258    function send() {
    259259        window.parent.postMessage( {
    260             height: document.getElementById('main').offsetHeight || 0,
     260            height: Math.max( document.getElementsByTagName('html')[0].offsetHeight, document.documentElement.clientHeight ),
    261261            el: id
    262262        }, '*' );
Note: See TracChangeset for help on using the changeset viewer.