Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse cursor offset in Firefox because of Resist Fingerprinting #5369

Open
scvalex opened this issue Nov 13, 2024 · 1 comment
Open

Mouse cursor offset in Firefox because of Resist Fingerprinting #5369

scvalex opened this issue Nov 13, 2024 · 1 comment
Labels
bug Something is broken eframe Relates to epi and eframe web Related to running Egui on the web

Comments

@scvalex
Copy link

scvalex commented Nov 13, 2024

Describe the bug

This is a twist on #4108. The symptom is the same: the mouse cursor is offset in eframe_template on the web in exactly the same way the video on the issue demonstrates. However, the actual cause here is Firefox's "Resist Fingerprinting" feature.

I don't know if there's actually a possible egui solution here because I suspect Firefox is just lying to the app somehow. I'm opening this issue mostly to save the next person who runs into this some time.

To Reproduce
Steps to reproduce the behavior:

  1. Serve egui_template locally with trunk serve,
  2. Browse in Firefox with privacy.resistFingerprinting=true (which I think is set by the "Enhanced Tracking Protection" feature somehow).

Alternatively, just go to https://www.egui.rs/#demo in Firefox and the mouse will be offset there too.

Workaround

For the demo, you can add egui.rs to privacy.resistFingerprinting.exemptedDomains in about:config. Adding localhost or localhost:8080 to the same setting doesn't seem to work.

Clicking on the shield icon to the left of the URL and disabling "Enhanced Tracking Protection" for the site doesn't seem to work.

Alternatively, set privacy.resistFingerprinting to false. I'm personally doing this because this setting just breaks so many things.

@scvalex scvalex added the bug Something is broken label Nov 13, 2024
@lucasmerlin
Copy link
Collaborator

Can reproduce this on macos. I think it must be related to these two things they note under "What does Resist Fingerprinting alter?":

  • The device pixel ratio is reported as 2.0.
  • The CSS Resolution is reported as the zoom level, instead of taking into account the true device pixel ratio.

I think egui should be able to handle this correctly though, since e.g. imgui doesn't break with the feature enabled.

I think something is weird in eframe's device pixel ratio handling right now, since there also is a bug when dragging the browser window between monitors of different resolutions

@lucasmerlin lucasmerlin added web Related to running Egui on the web eframe Relates to epi and eframe labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken eframe Relates to epi and eframe web Related to running Egui on the web
Projects
None yet
Development

No branches or pull requests

2 participants