Range getClientRects line-height bug

Issue #12709138 • Assigned to Bogdan B.

Details

Author
Mark B.
Created
Jul 11, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 2 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.

Attachments

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.

    https://drafts.csswg.org/cssom-view/#extensions-to-the-range-interface
    “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.”

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

Sign in