Skip to content

Commit 35bd606

Browse files
committed
Ensure change event came from #input
1 parent 004840f commit 35bd606

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/file-attachment-element.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ function onChange(event: Event) {
139139
if (!(container instanceof FileAttachmentElement)) return
140140
const input = event.target
141141
if (!(input instanceof HTMLInputElement)) return
142+
const id = container.getAttribute('input')
143+
if (!id || input.id !== id) return
142144

143145
const files = input.files
144146
if (!files || files.length === 0) return

0 commit comments

Comments
 (0)