0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

🐛 Fix crash on iOS when displaying viewer

This commit is contained in:
alonso.torres 2022-03-16 21:51:02 +01:00
parent b4a997cde9
commit 1cac7d55d0
4 changed files with 28 additions and 15 deletions

View file

@ -1,5 +1,11 @@
# CHANGELOG
## 1.12.4-beta
### :bug: Bugs fixed
- Fix crash on iOS when displaying viewer [#1522](https://github.com/penpot/penpot/issues/1522)
## 1.12.3-beta
### :bug: Bugs fixed

View file

@ -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?

View file

@ -6,13 +6,15 @@
(ns app.util.dom
(:require
[app.common.exceptions :as ex]
[app.common.geom.point :as gpt]
[app.util.globals :as globals]
[app.util.object :as obj]
[cuerdas.core :as str]
[goog.dom :as dom]
[promesa.core :as p]))
[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
@ -289,8 +291,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]

View file

@ -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]