From e398047f8fba8de93eae51fd705bb4b592c49ea2 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Wed, 17 Jan 2024 23:47:02 +0000 Subject: [PATCH] fix: correctly apply event.currentTarget (#10216) --- .changeset/fair-pianos-talk.md | 5 +++++ packages/svelte/src/internal/client/render.js | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/fair-pianos-talk.md diff --git a/.changeset/fair-pianos-talk.md b/.changeset/fair-pianos-talk.md new file mode 100644 index 0000000000..f9622afbe9 --- /dev/null +++ b/.changeset/fair-pianos-talk.md @@ -0,0 +1,5 @@ +--- +"svelte": patch +--- + +fix: correctly apply event.currentTarget diff --git a/packages/svelte/src/internal/client/render.js b/packages/svelte/src/internal/client/render.js index bb1650748e..2d504b3ffe 100644 --- a/packages/svelte/src/internal/client/render.js +++ b/packages/svelte/src/internal/client/render.js @@ -1347,6 +1347,8 @@ function handle_event_propagation(root_element, event) { // @ts-expect-error is used above event.__root = root_element; + // @ts-expect-error is used above + current_target = root_element; } /**