Skip to content

Erroneous result for offsetHeight on Google Docs #13944

@Ms2ger

Description

@Ms2ger
.
<script>
    var zK = document.createElement("SPAN");
    zK.style.cssText = "position: absolute; top: -50000px; width: 1in; height: 1in";
    document.body.appendChild(zK);
    console.log(zK.offsetHeight);
    document.body.removeChild(zK);
</script>

logs 0 in Servo, but 96 in both Gecko and Chrome.

Google Docs throws an exception ("The number of pixels per point in the user's screen is not set") if the value is falsy ⇒ blocks #13942.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions