mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 00:16:38 +02:00
♻️ Refactor keyboard events to replace a deprecated parameter
This commit is contained in:
parent
547a472016
commit
b0575e969f
7 changed files with 25 additions and 33 deletions
|
@ -3,10 +3,10 @@
|
|||
[rumext.alpha :as mf]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.keyboard :as kbd]
|
||||
[goog.events :as events]
|
||||
[goog.object :as gobj])
|
||||
(:import goog.events.EventType
|
||||
goog.events.KeyCodes))
|
||||
(:import goog.events.EventType))
|
||||
|
||||
(mf/defc dropdown'
|
||||
{::mf/wrap-props false}
|
||||
|
@ -27,7 +27,7 @@
|
|||
|
||||
on-keyup
|
||||
(fn [event]
|
||||
(when (= (.-keyCode event) 27) ; ESC
|
||||
(when (kbd/esc? event)
|
||||
(on-close)))
|
||||
|
||||
on-mount
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue