From 919f6d246bc8be79efe5eb5b24570e5c220b0fad Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 25 Jan 2024 12:14:49 +0100 Subject: [PATCH] :bug: Fix problem with offset colorpicker in Safari --- .../src/app/main/ui/workspace/viewport/pixel_overlay.cljs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs b/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs index 1a1b0a9a60..b600551632 100644 --- a/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/pixel_overlay.cljs @@ -7,6 +7,7 @@ (ns app.main.ui.workspace.viewport.pixel-overlay (:require [app.common.math :as mth] + [app.config :as cfg] [app.main.data.modal :as modal] [app.main.data.workspace.colors :as dwc] [app.main.data.workspace.undo :as dwu] @@ -99,7 +100,9 @@ ;; I don't know why, but the zoom view is offset by 24px ;; instead of 25. sx (- x 32) - sy (- y 17) + + ;; Safari has a different offset fro the y coord + sy (if (cfg/check-browser? :safari) y (- y 17)) sw 65 sh 35 dx 0