löschung/deaktiverung

This commit is contained in:
2026-02-01 02:11:28 +01:00
parent adcd0efe2a
commit f5d2194839
3 changed files with 7 additions and 19 deletions

View File

@@ -1 +1 @@
1.2.7 1.2.8

View File

@@ -163,7 +163,7 @@ export function initEditor() {
selectionTimer = setTimeout(() => { selectionTimer = setTimeout(() => {
selectionJustChanged = false; selectionJustChanged = false;
selectionTimer = null; selectionTimer = null;
}, 120); }, 800);
}; };
const onUpdate = () => { const onUpdate = () => {
if (selectionJustChanged) return; if (selectionJustChanged) return;
@@ -174,7 +174,9 @@ export function initEditor() {
? model.changedAttributes() ? model.changedAttributes()
: (model && model.changed) ? model.changed : null; : (model && model.changed) ? model.changed : null;
const keys = changed ? Object.keys(changed) : []; 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; if (selectionJustChanged && keys.length === 0) return;
markDirty(); markDirty();
}; };

View File

@@ -2242,28 +2242,14 @@ class ApiKernel
if ($hasHtmlAttrs) return true; if ($hasHtmlAttrs) return true;
if (preg_match($jsonTypePattern, $html) && preg_match($jsonIdPattern, $html)) 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'; $libIdPattern = '/data-lib-id\s*=\s*(["\"])' . $id . '\1/i';
if (preg_match($libIdPattern, $html)) { if (preg_match($libIdPattern, $html)) {
if (!$libKinds) return true; 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;
}
} }
$jsonLibIdPattern = '/"data-lib-id"\s*:\s*("?)(?:' . $id . ')\1/i'; $jsonLibIdPattern = '/"data-lib-id"\s*:\s*("?)(?:' . $id . ')\1/i';
$jsonLibKindPattern = '/"data-lib-(?:kind|section)"\s*:\s*"([^"]+)"/i';
if (preg_match($jsonLibIdPattern, $html)) { if (preg_match($jsonLibIdPattern, $html)) {
if (!$libKinds) return true; 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 false; return false;