microsoft / fast

The adaptive interface system for modern web experiences.
https://www.fast.design
Other
9.25k stars 590 forks source link

fix: rtl scroll converter test asserting incorrect values #6859

Closed radium-v closed 10 months ago

radium-v commented 10 months ago

Pull Request

📖 Description

Changes the invertedGetRtlScrollConverter returns correct value test to pass when any value < 0 is returned.

🎫 Issues

This PR reverts #6857.

👩‍💻 Reviewer Notes

The behavior seems to be related to this Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1324251

It's something called "zoom for DSF" on MacOS, which leads to inaccurate value reporting:

browser value
Chrome 119.0.6045.107 (Headless/Karma) on Windows 11 1
Chrome 119.0.6045.123 on Mac (MBP M1, MacOS 14.0) 0.5
Webkit Nightly 0
Firefox Nightly 0

So while I do still think that screen DPI is partly to blame for Chrome returning 0.5, it seems that setting scrollLeft to 1 when in rtl mode and receiving anything other than 0 is a bug.

✅ Checklist

General