File tree Expand file tree Collapse file tree 4 files changed +24
-13
lines changed Expand file tree Collapse file tree 4 files changed +24
-13
lines changed Original file line number Diff line number Diff line change @@ -1478,13 +1478,20 @@ Arg *stop: atom, reset to true to stop the loop"
1478
1478
(when target
1479
1479
(some-> target (.querySelector " .CodeMirror" ) (.-CodeMirror )))))
1480
1480
1481
+ #?(:cljs
1482
+ (defn get-keep-keyboard-input-el
1483
+ ([] (get-keep-keyboard-input-el " " ))
1484
+ ([t]
1485
+ (js/document.getElementById (str " keep-keyboard-open-input" t)))))
1486
+
1481
1487
#?(:cljs
1482
1488
(defn mobile-keep-keyboard-open
1483
1489
([]
1484
1490
(mobile-keep-keyboard-open true ))
1485
1491
([schedule?]
1486
1492
(when (mobile? )
1487
- (let [f #(when-let [node (gdom/getElement " app-keep-keyboard-open-input" )]
1493
+ (let [f #(when-let [node (or (get-keep-keyboard-input-el " in-modal" )
1494
+ (get-keep-keyboard-input-el ))]
1488
1495
(.focus node))]
1489
1496
(if schedule? (schedule f) (f )))))))
1490
1497
Original file line number Diff line number Diff line change 27
27
[mobile.state :as mobile-state]
28
28
[rum.core :as rum]))
29
29
30
- (rum/defc keep-keyboard-open
31
- []
32
- [:input.absolute.top-4.left-0.w-1.h-1.opacity-0
33
- {:id " app-keep-keyboard-open-input"
34
- :auto-capitalize " off"
35
- :auto-correct " false" }])
36
30
37
31
(defn- sidebar-not-allowed-to-open?
38
32
[]
221
215
; ; bottom tabs
222
216
(ui-silk/app-silk-tabs )
223
217
224
- (keep-keyboard-open )
218
+ (ui-component/ keep-keyboard-virtual-input )
225
219
(ui-component/install-notifications )
226
220
(ui-component/install-modals )
227
221
Original file line number Diff line number Diff line change 101
101
102
102
(rum/defc block-cp
103
103
[block]
104
- [:div.app-silk-scroll-content-inner
105
- ; ; block page content
106
- [:div.block-modal-page-content
107
- (mobile-ui/classic-app-container-wrap
108
- (page/page-cp (db/entity [:block/uuid (:block/uuid block)])))]])
104
+ [:<>
105
+ (mobile-ui/keep-keyboard-virtual-input " in-modal" )
106
+ [:div.app-silk-scroll-content-inner
107
+ ; ; block page content
108
+ [:div.block-modal-page-content
109
+ (mobile-ui/classic-app-container-wrap
110
+ (page/page-cp (db/entity [:block/uuid (:block/uuid block)])))]]])
109
111
110
112
(rum/defc block-sheet-topbar
111
113
[block {:keys [favorited? set-favorited!]}]
Original file line number Diff line number Diff line change 20
20
[:div#main-container.flex.flex-1
21
21
[:div.w-full content]]]])
22
22
23
+ (rum/defc keep-keyboard-virtual-input
24
+ ([] (keep-keyboard-virtual-input " " ))
25
+ ([t]
26
+ [:input.absolute.top-4.left-0.w-1.h-1.opacity-0
27
+ {:id (str " keep-keyboard-open-input" t)
28
+ :auto-capitalize " off"
29
+ :auto-correct " false" }]))
30
+
23
31
(rum/defc notification-clear-all
24
32
[]
25
33
[:div.ui__notifications-content
You can’t perform that action at this time.
0 commit comments