fix(ui/templates): stop drop propagation on folder nodes

Without stopPropagation, dropping a template onto a folder fires both
OnDrop(folder) and OnDropOnRoot via event bubbling. The two async handlers
race on the same scoped DbContext, which is not thread-safe — the second
throws ObjectDisposedException and tears down the Blazor circuit. Surfaced
during browser smoke testing via JS-dispatched DragEvent sequence.
This commit is contained in:
Joseph Doherty
2026-05-11 12:28:05 -04:00
parent acead212b2
commit ca164dca03

View File

@@ -534,7 +534,8 @@
@ondragenter="() => OnDragEnter(node)"
@ondragleave="() => OnDragLeave(node)"
@ondragover:preventDefault="@isDropTarget"
@ondrop="() => OnDrop(node)">
@ondrop="() => OnDrop(node)"
@ondrop:stopPropagation="true">
@switch (node.Kind)
{
case TmplNodeKind.Folder: