Skip to content

Fix false positive on tall displays (relative threshold)#76

Open
EmpireOperating wants to merge 1 commit intosindresorhus:mainfrom
EmpireOperating:fix/false-positive-high-resolution
Open

Fix false positive on tall displays (relative threshold)#76
EmpireOperating wants to merge 1 commit intosindresorhus:mainfrom
EmpireOperating:fix/false-positive-high-resolution

Conversation

@EmpireOperating
Copy link

Fixes #33.

Summary:

  • Adds a relative threshold (10% of outer dimension) on top of the existing absolute threshold (170px) to avoid false positives on large/tall displays.
  • Adds node:test regression tests for a 1920×1980-style scenario.
  • Exports a small evaluateDevtools(...) helper for testability.

Notes:

  • I couldn't reproduce on real hardware; this is a conservative heuristic mitigation based on the reported window-metric pattern.

Use a relative threshold (10% of outer dimension) alongside the existing absolute threshold to reduce false-positives on large displays. Add an exported evaluateDevtools helper and node:test regression tests.
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.

problem with monitors with resolution 1920x1980

1 participant

Comments