mirror of https://github.com/logseq/logseq
fix(editor): new block placeholder now accepts tab and enter key
parent
70a3028c80
commit
8c939a6cbd
|
@ -151,7 +151,12 @@
|
|||
(rum/defc add-button
|
||||
[args]
|
||||
[:div.flex-1.flex-col.rounded-sm.add-button-link-wrap
|
||||
{:on-click (fn [] (editor-handler/api-insert-new-block! "" args))}
|
||||
{:on-click (fn [] (editor-handler/api-insert-new-block! "" args))
|
||||
:on-key-down (fn [e]
|
||||
(when (= "Enter" (util/ekey e))
|
||||
(editor-handler/api-insert-new-block! "" args))
|
||||
(util/stop e))
|
||||
:tab-index 0}
|
||||
[:div.flex.flex-row
|
||||
[:div.block {:style {:height 20
|
||||
:width 20
|
||||
|
|
|
@ -310,6 +310,11 @@ html.is-native-iphone-without-notch {
|
|||
}
|
||||
}
|
||||
|
||||
.add-button-link-wrap:focus .add-button-link {
|
||||
opacity: .8 !important;
|
||||
transform: scale(.9);
|
||||
}
|
||||
|
||||
.cp__right-sidebar .add-button-link {
|
||||
margin-left: 21px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue