Skip to content

Commit 2bc9af4

Browse files
committed
fix: avoid chromium issue with dispatching blur on element removal
1 parent ec68c95 commit 2bc9af4

File tree

1 file changed

+2
-2
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+2
-2
lines changed

packages/svelte/src/internal/client/reactivity/effects.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,15 +380,15 @@ export function destroy_effect(effect, remove_dom = true) {
380380
// Really we only need to do this in Chromium because of https://chromestatus.com/feature/5128696823545856,
381381
// as removal of the DOM can cause sync `blur` events to fire, which can cause logic to run inside
382382
// the current `active_reaction`, which isn't what we want at all
383-
set_active_reaction(null)
383+
set_active_reaction(null);
384384
while (node !== null) {
385385
/** @type {TemplateNode | null} */
386386
var next = node === end ? null : /** @type {TemplateNode} */ (get_next_sibling(node));
387387

388388
node.remove();
389389
node = next;
390390
}
391-
set_active_reaction(previous_reaction)
391+
set_active_reaction(previous_reaction);
392392

393393
removed = true;
394394
}

0 commit comments

Comments
 (0)