wip fix component
This commit is contained in:
parent
53eefed895
commit
1c1ea7767d
|
|
@ -46,14 +46,15 @@ export const EdCompPicker = () => {
|
|||
if (
|
||||
item.type === "item" &&
|
||||
item.component?.id &&
|
||||
active_meta.parent?.id
|
||||
active_meta.parent?.id &&
|
||||
item.component?.id !== active.comp_id
|
||||
) {
|
||||
active_meta = getMetaById(p, active_meta.parent.id);
|
||||
|
||||
if (active_meta) {
|
||||
item = active_meta.item;
|
||||
} else {
|
||||
alert("Failed to add component!");
|
||||
alert("Warning: Please edit component first before adding. ");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@ export const mainPerItemVisit = (
|
|||
if ((meta.item as IContent).type === "text" && !meta.item.adv?.jsBuilt) {
|
||||
parts.props.spellCheck = false;
|
||||
parts.props.contentEditable = true;
|
||||
if (meta.parent?.comp_id) {
|
||||
if (meta.parent.comp_id !== active.comp_id) {
|
||||
parts.props.contentEditable = false;
|
||||
}
|
||||
}
|
||||
|
||||
parts.props.onBlur = (e) => {
|
||||
text_edit.prevent_select_all = false;
|
||||
|
|
@ -104,6 +109,8 @@ export const mainPerItemVisit = (
|
|||
is_active && "el-active",
|
||||
is_active &&
|
||||
css`
|
||||
outline: none;
|
||||
|
||||
&::after {
|
||||
content: " ";
|
||||
pointer-events: none;
|
||||
|
|
|
|||
Loading…
Reference in New Issue