mirror of https://github.com/penpot/penpot.git
Merge pull request #6887 from dfelinto/fix-trackpad-swipe
🐛 Fix touchpad swipe back/forward #4246
This commit is contained in:
commit
931d72b41f
|
|
@ -29,6 +29,7 @@
|
|||
- Fix problem when creating a layout from an existing layout [Taiga #11554](https://tree.taiga.io/project/penpot/issue/11554)
|
||||
- Fix title button from Title Case to Capitalize [Taiga #11476](https://tree.taiga.io/project/penpot/issue/11476)
|
||||
- Fix Main component receives focus and is selected when using 'Show Main Component' [Taiga #11402](https://tree.taiga.io/project/penpot/issue/11402)
|
||||
- Fix touchpad swipe leading to navigating back/forth [GitHub #4246](https://github.com/penpot/penpot/issues/4246)
|
||||
|
||||
## 2.8.0
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
[app.main.ui.onboarding.team-choice :refer [onboarding-team-modal]]
|
||||
[app.main.ui.releases :refer [release-notes-modal]]
|
||||
[app.main.ui.static :as static]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.i18n :refer [tr]]
|
||||
[app.util.theme :as theme]
|
||||
[beicon.v2.core :as rx]
|
||||
|
|
@ -362,6 +363,8 @@
|
|||
;; initialize themes
|
||||
(theme/use-initialize profile)
|
||||
|
||||
(dom/prevent-browser-gesture-navigation!)
|
||||
|
||||
[:& (mf/provider ctx/current-route) {:value route}
|
||||
[:& (mf/provider ctx/current-profile) {:value profile}
|
||||
(if edata
|
||||
|
|
|
|||
|
|
@ -891,3 +891,12 @@
|
|||
(defn last-child
|
||||
[^js node]
|
||||
(.. node -lastChild))
|
||||
|
||||
(defn prevent-browser-gesture-navigation!
|
||||
[]
|
||||
;; Prevent the browser from interpreting trackpad horizontal swipe as back/forth
|
||||
;;
|
||||
;; In theory We could disable this only for the workspace. However gets too unreliable.
|
||||
;; It is better to be safe and disable for the dashboard as well.
|
||||
(set! (.. js/document -documentElement -style -overscrollBehaviorX) "none")
|
||||
(set! (.. js/document -body -style -overscrollBehaviorX) "none"))
|
||||
Loading…
Reference in New Issue