mirror of https://github.com/logseq/logseq
fix: search not jump to the specific block
parent
8fd7e0cbbe
commit
7accf8adbc
|
@ -256,7 +256,6 @@
|
|||
:clip-rule "evenodd"
|
||||
:fill-rule "evenodd"}]]]
|
||||
[:input#search_field.block.w-full.h-full.pr-3.py-2.rounded-md.focus:outline-none.placeholder-gray-500.focus:placeholder-gray-400.sm:text-sm.sm:bg-transparent
|
||||
|
||||
{:style {:padding-left "2rem"}
|
||||
:placeholder (t :search)
|
||||
:auto-complete (if (util/chrome?) "chrome-off" "off") ; off not working here
|
||||
|
@ -272,7 +271,7 @@
|
|||
(reset! search-timeout
|
||||
(js/setTimeout
|
||||
#(search-handler/search value)
|
||||
100))))))}]
|
||||
200))))))}]
|
||||
(when-not (string/blank? search-q)
|
||||
(ui/css-transition
|
||||
{:class-names "fade"
|
||||
|
|
|
@ -78,17 +78,19 @@
|
|||
title (get-title (:name data) path-params)]
|
||||
(util/set-title! title)))
|
||||
|
||||
(defn jump-to-anchor!
|
||||
[anchor-text]
|
||||
(when anchor-text
|
||||
(ui-handler/highlight-element! anchor-text)))
|
||||
|
||||
(defn set-route-match!
|
||||
[route]
|
||||
(let [route route]
|
||||
(swap! state/state assoc :route-match route)
|
||||
(update-page-title! route)
|
||||
(util/scroll-to-top)))
|
||||
|
||||
(defn jump-to-anchor!
|
||||
[anchor-text]
|
||||
(when anchor-text
|
||||
(ui-handler/highlight-element! anchor-text)))
|
||||
(when-let [anchor (get-in route [:query-params :anchor])]
|
||||
(jump-to-anchor! anchor)
|
||||
(util/scroll-to-top))))
|
||||
|
||||
(defn go-to-search!
|
||||
[]
|
||||
|
|
Loading…
Reference in New Issue