mirror of
https://github.com/logseq/logseq.git
synced 2026-05-29 15:09:41 +00:00
fix: show action bar for the first visible node
This commit is contained in:
@@ -2621,7 +2621,7 @@
|
||||
(keydown-new-line))))))
|
||||
|
||||
(defn- select-first-last
|
||||
"Select first or last block in viewpoint"
|
||||
"Select first or last block in viewport"
|
||||
[direction]
|
||||
(let [f (case direction :up last :down first)
|
||||
container (if (some-> js/document.activeElement
|
||||
|
||||
@@ -1078,7 +1078,7 @@
|
||||
|
||||
(defmethod handle :editor/show-action-bar []
|
||||
(let [selection (state/get-selection-blocks)
|
||||
first-visible-block (first selection)]
|
||||
first-visible-block (some #(when (util/el-visible-in-viewport? % true) %) selection)]
|
||||
(when first-visible-block
|
||||
(shui/popup-hide! :selection-action-bar)
|
||||
(shui/popup-show!
|
||||
|
||||
Reference in New Issue
Block a user