mirror of https://github.com/logseq/logseq
fix(ui): invalid up/down for the page preview editor
parent
be7997ed03
commit
32260d13d6
|
@ -746,7 +746,7 @@
|
|||
(rum/set-ref! *timer nil))
|
||||
(when-not timer1
|
||||
(rum/set-ref! *timer1
|
||||
(js/setTimeout #(set-visible! false) 500)))))}
|
||||
(js/setTimeout #(set-visible! false) 200)))))}
|
||||
children] children)))
|
||||
|
||||
(rum/defcs page-cp < db-mixins/query rum/reactive
|
||||
|
|
|
@ -241,3 +241,7 @@ html.is-native-ios {
|
|||
.no-ring {
|
||||
@apply focus:ring-0 focus:ring-offset-0;
|
||||
}
|
||||
|
||||
.ls-preview-popup {
|
||||
@apply pl-6;
|
||||
}
|
|
@ -3250,10 +3250,17 @@
|
|||
(some-> (first (dom/by-class "reveal"))
|
||||
(dom/has-class? "focused")))
|
||||
|
||||
(defn- in-page-preview?
|
||||
[]
|
||||
(some-> js/document.activeElement
|
||||
(.closest ".ls-preview-popup")
|
||||
(nil?) (not)))
|
||||
|
||||
(defn shortcut-up-down [direction]
|
||||
(fn [e]
|
||||
(when (and (not (auto-complete?))
|
||||
(not (in-shui-popup?))
|
||||
(or (in-page-preview?)
|
||||
(not (in-shui-popup?)))
|
||||
(not (slide-focused?))
|
||||
(not (state/get-timestamp-block)))
|
||||
(util/stop e)
|
||||
|
|
Loading…
Reference in New Issue