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