From 45f59d28c1b5b3cd8ab0f62f47ddb501f4c503d5 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Wed, 3 Apr 2024 21:10:16 +0100 Subject: [PATCH] Fix menu disappearing on chrome --- web/scripts/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/scripts/app.js b/web/scripts/app.js index 0b0cd6251..09b7e59e7 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -1500,6 +1500,9 @@ export class ComfyApp { function resizeCanvas() { // Limit minimal scale to 1, see https://github.com/comfyanonymous/ComfyUI/pull/845 const scale = Math.max(window.devicePixelRatio, 1); + + // Clear fixed width and height while calculating rect so it uses 100% instead + canvasEl.height = canvasEl.width = ""; const { width, height } = canvasEl.getBoundingClientRect(); canvasEl.width = Math.round(width * scale); canvasEl.height = Math.round(height * scale);