fix: should be able to place editing cursor correctly

pull/6489/head
Peng Xiao 2022-08-18 16:07:03 +08:00
parent 420009681c
commit 01729f285b
2 changed files with 3 additions and 5 deletions

View File

@ -2242,6 +2242,7 @@
(let [id' (swap! *blocks-container-id inc)]
(reset! *init-blocks-container-id id')
id'))
block-el-id (str "ls-block-" blocks-container-id "-" uuid)
config {:id (str uuid)
:db/id (:db/id block-entity)
:block? true
@ -2253,7 +2254,7 @@
[:div.single-block
{:class (str block-uuid)
:id (str "ls-block-" blocks-container-id "-" block-uuid)}
(block-content-or-editor config block edit-input-id uuid (:block/heading-level block) edit? true)])))
(block-content-or-editor config block edit-input-id block-el-id (:block/heading-level block) edit? true)])))
(rum/defc single-block-cp
[block-uuid]

View File

@ -294,9 +294,6 @@
backface-visibility: hidden;
pointer-events: all;
vertical-align: baseline;
-webkit-user-drag: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
}
.tl-text-shape-input {
@ -320,7 +317,6 @@
backface-visibility: hidden;
pointer-events: all;
user-select: text;
-webkit-user-select: text;
}
.tl-stroke-hitarea {
@ -544,6 +540,7 @@
transform: translate(1px, 1px);
overscroll-behavior: none;
opacity: 1;
user-select: text;
&[data-collapsed='true'] {
@apply overflow-hidden;