mirror of
https://github.com/penpot/penpot.git
synced 2025-03-11 07:11:32 -05:00
🐛 Fix crash on iOS when displaying viewer
This commit is contained in:
parent
8acc9af1f5
commit
89e2f4a481
4 changed files with 17 additions and 9 deletions
|
@ -45,6 +45,7 @@
|
|||
- Fix ellipsis in long page names [Taiga #2962](https://tree.taiga.io/project/penpot/issue/2962)
|
||||
- Fix color palette animation [Taiga #2852](https://tree.taiga.io/project/penpot/issue/2852)
|
||||
- Fix display code icon on preview hover [Taiga #2838](https://tree.taiga.io/project/penpot/us/2838)
|
||||
- Fix crash on iOS when displaying viewer [#1522](https://github.com/penpot/penpot/issues/1522)
|
||||
|
||||
### :arrow_up: Deps updates
|
||||
### :heart: Community contributions by (Thank you!)
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
(mf/deps fullscreen?)
|
||||
(fn []
|
||||
;; Trigger dom fullscreen depending on our state
|
||||
(let [wrapper (dom/get-element "viewer-layout")
|
||||
(let [wrapper (dom/get-element "viewer-layout")
|
||||
fullscreen-dom? (dom/fullscreen?)]
|
||||
(when (not= fullscreen? fullscreen-dom?)
|
||||
(if fullscreen?
|
||||
|
|
|
@ -7,14 +7,16 @@
|
|||
(ns app.util.dom
|
||||
(:require
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.geom.point :as gpt]
|
||||
[app.common.logging :as log]
|
||||
[app.util.globals :as globals]
|
||||
[app.util.object :as obj]
|
||||
[cuerdas.core :as str]
|
||||
[goog.dom :as dom]
|
||||
[promesa.core :as p]))
|
||||
|
||||
(log/set-level! :warn)
|
||||
|
||||
;; --- Deprecated methods
|
||||
|
||||
(defn event->inner-text
|
||||
|
@ -306,8 +308,9 @@
|
|||
(boolean (.-fullscreenElement globals/document))
|
||||
|
||||
:else
|
||||
(ex/raise :type :not-supported
|
||||
:hint "seems like the current browser does not support fullscreen api.")))
|
||||
(do
|
||||
(log/error :msg "Seems like the current browser does not support fullscreen api.")
|
||||
false)))
|
||||
|
||||
(defn ^boolean blob?
|
||||
[^js v]
|
||||
|
|
|
@ -8,11 +8,13 @@
|
|||
"HTML5 web api helpers."
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.logging :as log]
|
||||
[app.util.object :as obj]
|
||||
[beicon.core :as rx]
|
||||
[cuerdas.core :as str]))
|
||||
|
||||
(log/set-level! :warn)
|
||||
|
||||
(defn- file-reader
|
||||
[f]
|
||||
(rx/create
|
||||
|
@ -114,8 +116,9 @@
|
|||
(.webkitRequestFullscreen el)
|
||||
|
||||
:else
|
||||
(ex/raise :type :not-supported
|
||||
:hint "seems like the current browser does not support fullscreen api.")))
|
||||
(do
|
||||
(log/error :msg "Seems like the current browser does not support fullscreen api.")
|
||||
false)))
|
||||
|
||||
(defn exit-fullscreen
|
||||
[]
|
||||
|
@ -127,8 +130,9 @@
|
|||
(.webkitExitFullscreen js/document)
|
||||
|
||||
:else
|
||||
(ex/raise :type :not-supported
|
||||
:hint "seems like the current browser does not support fullscreen api.")))
|
||||
(do
|
||||
(log/error :msg "Seems like the current browser does not support fullscreen api.")
|
||||
false)))
|
||||
|
||||
(defn observe-resize
|
||||
[node]
|
||||
|
|
Loading…
Add table
Reference in a new issue