Skip to content

Commit 21ff272

Browse files
authored
Merge pull request #79 from github/allow-clicking-on-svgs-in-buttons
allow clicking on svgs in buttons
2 parents 24f4ce9 + 2733d07 commit 21ff272

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)