Range getClientRects line-height bug

Fixed Issue #12709138


Mark B.
Jul 11, 2017
This issue is public.
Found in
  • Microsoft Edge
Reported by 3 people

Sign in to watch or report this issue.

Steps to reproduce

This is an interoperability bug between Edge and all other major browsers.

Edge returns client rects from the range.getClientRects() method whose heights depend upon the line-height. Chrome, Firefox and Safari return rects that do not depend upon the line-height in the exact same scenario.

Demonstration of the issue: https://booktrack.github.io/external-bug-reports/range-getclientrects-lineheight-edge-bug/
Viewing the demo in Edge and then in any other major browser reveals the discrepancy in Edge’s behaviour.


Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “James M.”

    Changed Assigned To to “Travis L.”

  • In addition to Edge exhibiting unique behaviour as compared to all other major browsers, it also seems to be counter to the behaviour specified in the CSSOM View Module spec.

    “For each Text node selected or partially selected by the range (including when the boundary-points are identical), include a DOMRect object (for the part that is selected, not the whole line box). The bounds of these DOMRect objects are computed using font metrics; thus, for horizontal writing, the vertical dimension of each box is determined by the font ascent and descent, and the horizontal dimension by the text advance width.”

  • Microsoft Edge Team

    Changed Assigned To to “Bogdan B.”

    Changed Status to “Confirmed”

    Changed Assigned To from “Bogdan B.” to “Francois R.”

    Changed Status from “Confirmed” to “Fixed”

  • The next version of Edge will include a new text engine that doesn’t have this problem.

You need to sign in to your Microsoft account to add a comment.

Sign in