diff --git a/src/main/frontend/components/block.cljs b/src/main/frontend/components/block.cljs index e3404bbbd..4a4361ccf 100644 --- a/src/main/frontend/components/block.cljs +++ b/src/main/frontend/components/block.cljs @@ -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 diff --git a/src/main/frontend/components/page.css b/src/main/frontend/components/page.css index 66cd37c9b..5b4caaa18 100644 --- a/src/main/frontend/components/page.css +++ b/src/main/frontend/components/page.css @@ -241,3 +241,7 @@ html.is-native-ios { .no-ring { @apply focus:ring-0 focus:ring-offset-0; } + +.ls-preview-popup { + @apply pl-6; +} \ No newline at end of file diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 95887ccea..fe1f6ace3 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -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)