Fix autosave fetch URL shadowed by input[name=action]

This commit is contained in:
Alex Assistant 2026-02-20 15:01:38 +03:00
parent 2db58562f1
commit f97064ab8b

View File

@ -446,7 +446,8 @@ function nextUniqueCodeName(string $base): string
try {
if (ajaxInput) ajaxInput.value = '1';
const fd = new FormData(form);
const r = await fetch(form.action, {
const endpoint = form.getAttribute('action') || window.location.href;
const r = await fetch(endpoint, {
method: 'POST',
body: fd,
headers: {