0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

Merge pull request #2898 from penpot/alotor-fix-safari-thumbnails

🐛 Temporary deactivate thumbnails in Safari
This commit is contained in:
Alejandro 2023-02-02 17:37:25 +01:00 committed by GitHub
commit e426425cb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,8 @@
(let [canvas-node (mf/ref-val frame-canvas-ref) (let [canvas-node (mf/ref-val frame-canvas-ref)
img-node (mf/ref-val frame-image-ref)] img-node (mf/ref-val frame-image-ref)]
(when (draw-thumbnail-canvas! canvas-node img-node) (when (draw-thumbnail-canvas! canvas-node img-node)
(reset! image-url nil) (when-not (cf/check-browser? :safari)
(reset! image-url nil))
(when @show-frame-thumbnail (when @show-frame-thumbnail
(reset! show-frame-thumbnail false)) (reset! show-frame-thumbnail false))
@ -277,6 +278,7 @@
:height height :height height
:style {;; Safari has a problem with the positioning of the canvas. All this is to fix Safari behavior :style {;; Safari has a problem with the positioning of the canvas. All this is to fix Safari behavior
;; https://bugs.webkit.org/show_bug.cgi?id=23113 ;; https://bugs.webkit.org/show_bug.cgi?id=23113
:display (when (cf/check-browser? :safari) "none")
:position "fixed" :position "fixed"
:transform-origin "top left" :transform-origin "top left"
:transform (when (cf/check-browser? :safari) (dm/fmt "scale(%)" zoom)) :transform (when (cf/check-browser? :safari) (dm/fmt "scale(%)" zoom))