MouseEvent.screenX/Y do not respect devicePixelRatio

Confirmed Issue #16006191 • Assigned to wptrentri

Details

Author
Takao B.
Created
Feb 19, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Standard affected
CSSOM View Module

Found in build #
16.16299
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Steps to reproduce

  1. Set the system scale larger than 100%.
  2. Open https://jsfiddle.net/0uknfmp2/4/
  3. Make sure the value displayed under “devicePixelRatio” is larger than 1.
  4. Click any point.

Expected result

The displayed coordinates are in CSS pixels (scaled with devicePixelRatio).

https://www.w3.org/TR/cssom-view-1/#css-pixels

All coordinates and dimensions for the APIs defined in this specification are in CSS pixels, unless otherwise specified.

Actual result

The values are in physical device pixels.

Remarks

  • Chrome 66, Firefox 60 and Safari 11 return CSS pixels. Only IE and Edge return physical pixels.
  • Other values such as window.screenX, screen.width and MouseEvent.pageX are CSS values on Edge.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “wptsixtri”

      Changed Assigned To to “wptrentri”

      Changed Assigned To from “wptrentri” to “Matt R.”

      Changed Status to “Confirmed”

      Changed Assigned To to “wptrentri”

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

    Sign in