Skip to content

Commit 2733d07

Browse files
committed
allow clicking on svgs in buttons
1 parent 24f4ce9 commit 2733d07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ if (!window.customElements.get('md-strikethrough')) {
310310

311311
function applyFromToolbar(event: Event) {
312312
const {target, currentTarget} = event
313-
if (!(target instanceof HTMLElement)) return
313+
if (!(target instanceof Element)) return
314314
const mdButton = target.closest('[data-md-button]')
315315
if (!mdButton || mdButton.closest('markdown-toolbar') !== currentTarget) return
316316
const mdButtonStyle = target.getAttribute('data-md-button')

0 commit comments

Comments
 (0)