diff --git a/frontend/src/app/config.cljs b/frontend/src/app/config.cljs index 4755b9fa15..793cae8ed3 100644 --- a/frontend/src/app/config.cljs +++ b/frontend/src/app/config.cljs @@ -27,7 +27,7 @@ ;; --- Auxiliar Functions (def valid-browsers - #{:chrome :firefox :safari :safari-16 :safari-17 :edge :other}) + #{:chrome :firefox :safari :safari-16 :safari-17 :safari-18 :safari-26 :edge :other}) (def valid-platforms #{:windows :linux :macos :other}) @@ -40,13 +40,17 @@ check-edge? (fn [] (str/includes? user-agent "edg")) check-safari? (fn [] (str/includes? user-agent "safari")) check-safari-16? (fn [] (and (check-safari?) (str/includes? user-agent "version/16"))) - check-safari-17? (fn [] (and (check-safari?) (str/includes? user-agent "version/17")))] + check-safari-17? (fn [] (and (check-safari?) (str/includes? user-agent "version/17"))) + check-safari-18? (fn [] (and (check-safari?) (str/includes? user-agent "version/18"))) + check-safari-26? (fn [] (and (check-safari?) (str/includes? user-agent "version/26")))] (cond ^boolean (check-edge?) :edge ^boolean (check-chrome?) :chrome ^boolean (check-firefox?) :firefox ^boolean (check-safari-16?) :safari-16 ^boolean (check-safari-17?) :safari-17 + ^boolean (check-safari-18?) :safari-18 + ^boolean (check-safari-26?) :safari-26 ^boolean (check-safari?) :safari :else :unknown))) diff --git a/frontend/src/app/main/ui/workspace/shapes/text/v2_editor.cljs b/frontend/src/app/main/ui/workspace/shapes/text/v2_editor.cljs index 899c5af16d..d73c437b9c 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text/v2_editor.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text/v2_editor.cljs @@ -364,7 +364,7 @@ ;; NOTE: this teoretically breaks hooks rules, but in practice ;; it is imposible to really break it maybe-zoom - (when (cf/check-browser? :safari-16) + (when (or (cf/check-browser? :safari) (cf/check-browser? :safari-26) (cf/check-browser? :safari-18)) (mf/deref refs/selected-zoom)) shape (cond-> shape @@ -420,17 +420,23 @@ ;; Transform is necessary when there is a text overflow and the vertical ;; aligment is center or bottom. (and (not render-wasm?) - (not (cf/check-browser? :safari))) + (not (cf/check-browser? :safari-16))) (obj/merge! #js {:transform (dm/fmt "translate(%px, %px)" (- (dm/get-prop shape :x) x) (- (dm/get-prop shape :y) y))}) - (cf/check-browser? :safari-17) + (or (cf/check-browser? :safari-18) (cf/check-browser? :safari-26) (cf/check-browser? :safari-17)) (obj/merge! #js {:height "100%" :display "flex" :flexDirection "column" :justifyContent (shape->justify shape)}) + (or (cf/check-browser? :safari-26) (cf/check-browser? :safari-18)) + (obj/merge! + #js {:position "fixed" + :transform-origin "top left" + :transform (dm/fmt "scale(%)" maybe-zoom)}) + (cf/check-browser? :safari-16) (obj/merge! #js {:position "fixed"