Skip to content

Conversation

@iamAbhi-916
Copy link
Contributor

@iamAbhi-916 iamAbhi-916 commented Dec 16, 2025

Description

The DevTools overlay receives element coordinates in DIPs (Device Independent Pixels) from JavaScript, but the composition layer draws visuals in physical pixels. Without converting the coordinates using the scale factor, the overlay positions and sizes are incorrect on high-DPI displays.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

Fixes RN devtools debugging experience on windows.

Resolves #15468

What

Apply PointScaleFactor() to convert DIP coordinates to physical pixels before drawing the overlay visuals.

Screenshots

This is captured on scale factor (150%), which is default scale factor on Windows surface devices.

fix_debugger_overlay.mp4

Testing

Tested using playground and devtools.

Changelog

Should this change be included in the release notes: yes

Add a brief summary of the change to use in the release notes for the next release.
Fixed DevTools element highlighting appearing at wrong positions on high-DPI displays by converting coordinates from DIPs to physical pixels.

Microsoft Reviewers: Open in CodeFlow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

High Display Scaling (>100%) Causes DevTools to Report Incorrect App and Component Offsets

1 participant