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

[Bug]: Selection Marquee display is offset when browser zoom is not 100% #2481

Open
typpos opened this issue Feb 9, 2025 · 3 comments
Open
Labels
bug Something isn't working

Comments

@typpos
Copy link

typpos commented Feb 9, 2025

Frontend Version

  • Windows 11
  • Chrome 133.0.6943.60 (Official Build) (64-bit)
  • ComfyUI 0.3.14
  • ComfyUI_frontend v1.8.14

Expected Behavior

Marquee moves with mouse

Actual Behavior

Marquee is offset from mouse

Steps to Reproduce

Repro:

  • Start ComfyUI server with --disable-all-custom-nodes
  • In Chrome open Comfy
  • In Chrome go Settings > Zoom and set to 90%
  • In ComfyUI canvas CTRL-drag the mouse
  • Issue: Canvas display is offset from mouse

Debug Logs

n/a

Browser Logs

n/a

Setting JSON

n/a

What browsers do you use to access the UI ?

Google Chrome

Other

Workaround: reset Chrome Zoom to 100%

Related: #2443

chrome_zqdjpVyeoQ.mp4

┆Issue is synchronized with this Notion page by Unito

@typpos typpos added the Potential Bug Untriaged bug label Feb 9, 2025
@LukeG89
Copy link

LukeG89 commented Feb 9, 2025

I've tried to reproduce the issue, but everything seems to work fine.

This is your same situation:

  • Frontend v1.8.14
  • ComfyUI v0.3.14
  • Windows 11
  • Chrome 133.0.6943.60
  • All nodes disabled
Zoom-test-01.mp4

I also tried with my nodes enabled and latest frontend (v1.9.8), no problems:

Zoom-test-02.mp4

@typpos
Copy link
Author

typpos commented Feb 10, 2025

Strange. If it helps anything, I can "fix" it by..

  • Start Comfy
  • Set Chrome 90%
  • Open Dev Panel (f12) > Sources > "index-DqqhYDnY.js" > Line 61934 (" ctx.setTransform(ratio, 0, 0, ratio, 0, 0);")
  • Set breakpoint
  • In Comfy, start ctrl-drag
  • (breakpoint triggers)
  • In Dev Panel > console: "ratio = 1.0"
  • Continue run
  • Note how a single pixel is rendered (the marquee rect) at the CORRECT drag-start location in the canvas

Image

@huchenlei huchenlei added bug Something isn't working and removed Potential Bug Untriaged bug labels Feb 10, 2025
@huchenlei
Copy link
Member

Bug confirmed reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants