löschung/deaktiverung
This commit is contained in:
@@ -1 +1 @@
|
||||
1.2.7
|
||||
1.2.8
|
||||
@@ -163,7 +163,7 @@ export function initEditor() {
|
||||
selectionTimer = setTimeout(() => {
|
||||
selectionJustChanged = false;
|
||||
selectionTimer = null;
|
||||
}, 120);
|
||||
}, 800);
|
||||
};
|
||||
const onUpdate = () => {
|
||||
if (selectionJustChanged) return;
|
||||
@@ -174,7 +174,9 @@ export function initEditor() {
|
||||
? model.changedAttributes()
|
||||
: (model && model.changed) ? model.changed : null;
|
||||
const keys = changed ? Object.keys(changed) : [];
|
||||
if (keys.length === 1 && keys[0] === 'status') return;
|
||||
if (!keys.length && selectionJustChanged) return;
|
||||
const safeKeys = new Set(['status', 'toolbar', 'selected', 'hovered', 'highlighted', 'hoverable', 'selectable', 'editable', 'draggable', 'droppable', 'copyable', 'removable', 'locked']);
|
||||
if (keys.length && keys.every(k => safeKeys.has(k))) return;
|
||||
if (selectionJustChanged && keys.length === 0) return;
|
||||
markDirty();
|
||||
};
|
||||
|
||||
@@ -2242,28 +2242,14 @@ class ApiKernel
|
||||
if ($hasHtmlAttrs) return true;
|
||||
if (preg_match($jsonTypePattern, $html) && preg_match($jsonIdPattern, $html)) return true;
|
||||
|
||||
$kindPattern = '/data-lib-(?:kind|section)\s*=\s*(["\"])([^"\']+)\1/i';
|
||||
$libIdPattern = '/data-lib-id\s*=\s*(["\"])' . $id . '\1/i';
|
||||
if (preg_match($libIdPattern, $html)) {
|
||||
if (!$libKinds) return true;
|
||||
if (preg_match($kindPattern, $html, $m)) {
|
||||
$kind = strtolower(trim((string)($m[2] ?? '')));
|
||||
if ($kind === '' || in_array($kind, $libKinds, true)) return true;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$jsonLibIdPattern = '/"data-lib-id"\s*:\s*("?)(?:' . $id . ')\1/i';
|
||||
$jsonLibKindPattern = '/"data-lib-(?:kind|section)"\s*:\s*"([^"]+)"/i';
|
||||
if (preg_match($jsonLibIdPattern, $html)) {
|
||||
if (!$libKinds) return true;
|
||||
if (preg_match($jsonLibKindPattern, $html, $m)) {
|
||||
$kind = strtolower(trim((string)($m[1] ?? '')));
|
||||
if ($kind === '' || in_array($kind, $libKinds, true)) return true;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user