0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00

🐛 Fix problem with sticky selection on hovering sidebars

This commit is contained in:
alonso.torres 2024-03-19 11:03:36 +01:00
parent e3f508d8d4
commit dec3478024

View file

@ -11,7 +11,10 @@
[app.common.geom.point :as gpt]
[app.main.store :as st]
[app.util.dom :as dom]
[rumext.v2 :as mf]))
[app.util.mouse :as mse]
[goog.events :as events]
[rumext.v2 :as mf])
(:import goog.events.EventType))
(defonce viewport-ref (atom nil))
(defonce current-observer (atom nil))
@ -45,6 +48,8 @@
#(fn [node]
(mf/set-ref-val! ref node)
(reset! viewport-ref node)
(when (some? node)
(events/listen node EventType.MOUSEOUT (fn [] (st/emit! (mse/->BlurEvent)))))
(init-observer node on-change-bounds)))]))
(defn point->viewport