Skip to content

Commit

Permalink
test focus fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sprocketc committed Jan 4, 2025
1 parent 2d784ed commit c33c86a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/renderer/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
(.addEventListener js/document "keydown" keyb/event-handler!)
(.addEventListener js/document "keyup" keyb/event-handler!)
(.addEventListener js/document "fullscreenchange" #(rf/dispatch [::window.e/set-fullscreen (boolean (.-fullscreenElement js/document))]))
(.addEventListener js/document "DOMContentLoaded" set-focused!)
(.addEventListener js/window "load" (set-focused!))
(.addEventListener js/window "focus" (rf/dispatch [::window.e/set-focused true]))
(.addEventListener js/window "blur" (set-focused!))

Expand Down
3 changes: 1 addition & 2 deletions src/renderer/document/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@
[(rf/inject-cofx ::app.fx/guid)]
(fn [{:keys [db guid]} [_]]
{:db (-> (create db guid)
(history.h/finalize "Create document"))
:dispatch-later {:ms 1 :dispatch [::center]}}))
(history.h/finalize "Create document"))}))

(rf/reg-event-fx
::init
Expand Down

0 comments on commit c33c86a

Please sign in to comment.