diff --git a/src/App.vue b/src/App.vue
index 70ecc31228..5640ce70a2 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/src/assets/css/style.css b/src/assets/css/style.css
index af31f6db08..1611fedc0d 100644
--- a/src/assets/css/style.css
+++ b/src/assets/css/style.css
@@ -87,12 +87,18 @@ body {
z-index: 10;
}
-#graph-canvas {
+#graph-canvas-container {
width: 100%;
height: 100%;
order: 2;
grid-column: 2;
grid-row: 2;
+ position: relative;
+}
+
+#graph-canvas {
+ width: 100%;
+ height: 100%;
}
.comfyui-body-right {
diff --git a/src/components/LiteGraphCanvasSplitterOverlay.vue b/src/components/LiteGraphCanvasSplitterOverlay.vue
new file mode 100644
index 0000000000..89917c1c0d
--- /dev/null
+++ b/src/components/LiteGraphCanvasSplitterOverlay.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/sidebar/SideToolBar.vue b/src/components/sidebar/SideToolBar.vue
index c044cb9124..bed8926ac9 100644
--- a/src/components/sidebar/SideToolBar.vue
+++ b/src/components/sidebar/SideToolBar.vue
@@ -1,25 +1,39 @@
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/scripts/app.ts b/src/scripts/app.ts
index 91c52e0177..76d2433519 100644
--- a/src/scripts/app.ts
+++ b/src/scripts/app.ts
@@ -1845,13 +1845,18 @@ export class ComfyApp {
await this.#setUser();
// Create and mount the LiteGraph in the DOM
+ const canvasContainer = document.createElement("div");
+ canvasContainer.id = "graph-canvas-container";
+
const mainCanvas = document.createElement("canvas");
mainCanvas.style.touchAction = "none";
const canvasEl = (this.canvasEl = Object.assign(mainCanvas, {
id: "graph-canvas",
}));
canvasEl.tabIndex = 1;
- document.body.prepend(canvasEl);
+ canvasContainer.prepend(canvasEl);
+ document.body.prepend(canvasContainer);
+
this.resizeCanvas();
await Promise.all([
diff --git a/src/scripts/ui/menu/menu.css b/src/scripts/ui/menu/menu.css
index f883227801..5d2ef73f1e 100644
--- a/src/scripts/ui/menu/menu.css
+++ b/src/scripts/ui/menu/menu.css
@@ -133,6 +133,10 @@
font-size: 0.8em;
display: flex;
padding: 4px 8px;
+ /* Chromium based browser randomly shifts the bar up by 4px on first interaction with canvas.
+ Compensate this by adding 4px to padding top. */
+ /* Firefox does not have this issue. */
+ padding-top: 8px;
align-items: center;
gap: 8px;
box-sizing: border-box;