only autofocus if new

This commit is contained in:
buchmann 2026-02-11 14:26:36 +01:00
parent 76f0b05a09
commit 47c0d78985
2 changed files with 2 additions and 2 deletions

View file

@ -71,7 +71,7 @@ class BaseEntityAdminForm extends AbstractType
'label' => 'name.label',
'attr' => [
'placeholder' => 'part.name.placeholder',
'autofocus' => true,
'autofocus' => $is_new,
],
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
]);