File tree 6 files changed +15
-22
lines changed
6 files changed +15
-22
lines changed Original file line number Diff line number Diff line change 20
20
[renderer.events]
21
21
[renderer.frame.core]
22
22
[renderer.history.core]
23
- [renderer.menubar.core]
24
23
[renderer.notification.core]
25
24
[renderer.panel.core]
26
25
[renderer.reepl.core]
48
47
██╔══██╗██╔══╝░░██╔═══╝░██╔══██║░░░██║░░░██╔══██║
49
48
██║░░██║███████╗██║░░░░░██║░░██║░░░██║░░░██║░░██║
50
49
╚═╝░░╚═╝╚══════╝╚═╝░░░░░╚═╝░░╚═╝░░░╚═╝░░░╚═╝░░╚═╝
51
-
50
+
52
51
░██████╗████████╗██╗░░░██╗██████╗░██╗░█████╗░
53
52
██╔════╝╚══██╔══╝██║░░░██║██╔══██╗██║██╔══██╗
54
53
╚█████╗░░░░██║░░░██║░░░██║██║░░██║██║██║░░██║
Original file line number Diff line number Diff line change 218
218
(fn [id]
219
219
(when-let [element (if id (.getElementById js/document id) (dom/canvas-element ))]
220
220
(js/setTimeout #(.focus element)))))
221
+
222
+ (rf/reg-event-fx
223
+ :focus
224
+ (fn [_ [_ id]]
225
+ {:focus id}))
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 528
528
[:> Menubar/Item
529
529
{:class " menu-item"
530
530
:onSelect #(do (rf/dispatch action)
531
- (rf/dispatch [:menubar/ focus nil ]))
531
+ (rf/dispatch [:focus nil ]))
532
532
:disabled (when disabled? @(rf/subscribe disabled?))}
533
533
label
534
534
[:div.right-slot
Original file line number Diff line number Diff line change 33
33
(.-shiftKey e) (conj :shift ))}]))
34
34
35
35
(defn input-key-down-handler
36
- " Generic on-key-down handler for input elements that dispatches an event `f`
37
- in order to update a db value on keyboard enter, or reset to the initial
36
+ " Generic on-key-down handler for input elements that dispatches an event `f`
37
+ in order to update a db value on keyboard enter, or reset to the initial
38
38
value `v` on escape.
39
39
40
- We need this to avoid updating the canvas with incomplete values while the
40
+ We need this to avoid updating the canvas with incomplete values while the
41
41
user is typing, and also avoid polluting the history stack.
42
42
43
43
The `default-value` attribute should be used to update the value reactively."
161
161
[[:element/select-all ]
162
162
[{:keyCode (key-codes " A" )
163
163
:ctrlKey true }]]
164
- [[:menubar/ focus " file" ]
164
+ [[:focus " file" ]
165
165
[{:keyCode (key-codes " F" )
166
166
:altKey true }]]
167
- [[:menubar/ focus " edit" ]
167
+ [[:focus " edit" ]
168
168
[{:keyCode (key-codes " E" )
169
169
:altKey true }]]
170
- [[:menubar/ focus " object" ]
170
+ [[:focus " object" ]
171
171
[{:keyCode (key-codes " O" )
172
172
:altKey true }]]
173
- [[:menubar/ focus " view" ]
173
+ [[:focus " view" ]
174
174
[{:keyCode (key-codes " V" )
175
175
:altKey true }]]
176
- [[:menubar/ focus " help" ]
176
+ [[:focus " help" ]
177
177
[{:keyCode (key-codes " H" )
178
178
:altKey true }]]
179
179
[[:element/move-up ]
You can’t perform that action at this time.
0 commit comments