mirror of
https://github.com/penpot/penpot.git
synced 2025-07-08 16:17:18 +02:00
🐛 Fix problem with alt getting stuck when alt+tab
This commit is contained in:
parent
bd44f49175
commit
6a4d505033
3 changed files with 24 additions and 1 deletions
|
@ -30,6 +30,7 @@
|
||||||
- Fix close colorpicker on Firefox when mouse-up is outside the picker [#2911](https://github.com/penpot/penpot/issues/2911)
|
- Fix close colorpicker on Firefox when mouse-up is outside the picker [#2911](https://github.com/penpot/penpot/issues/2911)
|
||||||
- Fix problems with touch devices and Wacom tablets [#2216](https://github.com/penpot/penpot/issues/2216)
|
- Fix problems with touch devices and Wacom tablets [#2216](https://github.com/penpot/penpot/issues/2216)
|
||||||
- Fix problem with board titles misplaced [Taiga #4738](https://tree.taiga.io/project/penpot/issue/4738)
|
- Fix problem with board titles misplaced [Taiga #4738](https://tree.taiga.io/project/penpot/issue/4738)
|
||||||
|
- Fix problem with alt getting stuck when alt+tab [Taiga #5013](https://tree.taiga.io/project/penpot/issue/5013)
|
||||||
|
|
||||||
### :heart: Community contributions by (Thank you!)
|
### :heart: Community contributions by (Thank you!)
|
||||||
- To @ondrejkonec: for contributing to the code with:
|
- To @ondrejkonec: for contributing to the code with:
|
||||||
|
|
|
@ -1008,6 +1008,13 @@
|
||||||
;; Navigation
|
;; Navigation
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(defn workspace-focus-lost
|
||||||
|
[]
|
||||||
|
(ptk/reify ::workspace-focus-lost
|
||||||
|
ptk/UpdateEvent
|
||||||
|
(update [_ state]
|
||||||
|
(assoc-in state [:workspace-global :show-distances?] false))))
|
||||||
|
|
||||||
(defn navigate-to-project
|
(defn navigate-to-project
|
||||||
[project-id]
|
[project-id]
|
||||||
(ptk/reify ::navigate-to-project
|
(ptk/reify ::navigate-to-project
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
;; Copyright (c) KALEIDOS INC
|
;; Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
(ns app.main.ui.workspace
|
(ns app.main.ui.workspace
|
||||||
|
(:import goog.events.EventType)
|
||||||
(:require
|
(:require
|
||||||
[app.common.colors :as clr]
|
[app.common.colors :as clr]
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
|
@ -32,9 +33,11 @@
|
||||||
[app.main.ui.workspace.textpalette :refer [textpalette]]
|
[app.main.ui.workspace.textpalette :refer [textpalette]]
|
||||||
[app.main.ui.workspace.viewport :refer [viewport]]
|
[app.main.ui.workspace.viewport :refer [viewport]]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
|
[app.util.globals :as globals]
|
||||||
[app.util.i18n :as i18n :refer [tr]]
|
[app.util.i18n :as i18n :refer [tr]]
|
||||||
[app.util.object :as obj]
|
[app.util.object :as obj]
|
||||||
[debug :refer [debug?]]
|
[debug :refer [debug?]]
|
||||||
|
[goog.events :as events]
|
||||||
[okulary.core :as l]
|
[okulary.core :as l]
|
||||||
[rumext.v2 :as mf]))
|
[rumext.v2 :as mf]))
|
||||||
|
|
||||||
|
@ -136,7 +139,19 @@
|
||||||
|
|
||||||
components-v2 (features/use-feature :components-v2)
|
components-v2 (features/use-feature :components-v2)
|
||||||
|
|
||||||
background-color (:background-color wglobal)]
|
background-color (:background-color wglobal)
|
||||||
|
|
||||||
|
focus-out
|
||||||
|
(mf/use-callback
|
||||||
|
(fn []
|
||||||
|
(st/emit! (dw/workspace-focus-lost))))]
|
||||||
|
|
||||||
|
(mf/use-effect
|
||||||
|
(mf/deps focus-out)
|
||||||
|
(fn []
|
||||||
|
(let [keys [(events/listen globals/document EventType.FOCUSOUT focus-out)]]
|
||||||
|
#(doseq [key keys]
|
||||||
|
(events/unlistenByKey key)))))
|
||||||
|
|
||||||
;; Setting the layout preset by its name
|
;; Setting the layout preset by its name
|
||||||
(mf/with-effect [layout-name]
|
(mf/with-effect [layout-name]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue