#109458"Removing the root element is not allowed" (1472553024) when deleting a form element
Description
Clicking the delete button in a form element’s stage toolbar throws the following uncaught JavaScript error, leaving the element undeleted:
Uncaught Error: Removing the root element is not allowed (1472553024)
at assert (core.js)
at Repository.removeFormElement (core.js)
at FormEditor.removeFormElement (form-editor.js)
at removeFormElement (view-model.js)
at Object.func (mediator.js)
at PublisherSubscriber.publish (core.js)
at Object.trigger (modals-component.js)
at Modal._buttonClick (modal.js)
Steps to reproduce
- Open any form in the Form Editor (or create a new one).
- Ensure the page contains exactly one element — or simply act immediately after opening / after saving the form, before clicking on any element to select it.
- Click the remove button directly in the element’s toolbar without first clicking on the element itself to select it.
- Confirm deletion in the modal dialog.
Expected behaviour
The element is removed. The stage shows the “new element” placeholder.
Actual behaviour
A JavaScript error is thrown. The element is not deleted. The Form Editor UI may remain in an inconsistent state.
Reviews 1
History 23
-
Gerrit Code Review pushed patch set 1 for main to change 93511 status
NewUnder Review <span data-processor="relativetime" data-value="2026-04-01T11:55:08+00:00" > 04/01/26, 11:55 </span> -
Josua Vogel commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-04-02T06:20:10+00:00" > 04/02/26, 06:20 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-04-21T11:30:33+00:00" > 04/21/26, 11:30 </span>
Applied in changeset commit:8e34f9d462b5926e7d23976be2730c6e3964ae90.