Skip to content

Commit

Permalink
Merge pull request #79 from github/allow-clicking-on-svgs-in-buttons
Browse files Browse the repository at this point in the history
allow clicking on svgs in buttons
  • Loading branch information
keithamus authored Mar 1, 2024
2 parents 24f4ce9 + 2733d07 commit 21ff272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ if (!window.customElements.get('md-strikethrough')) {

function applyFromToolbar(event: Event) {
const {target, currentTarget} = event
if (!(target instanceof HTMLElement)) return
if (!(target instanceof Element)) return
const mdButton = target.closest('[data-md-button]')
if (!mdButton || mdButton.closest('markdown-toolbar') !== currentTarget) return
const mdButtonStyle = target.getAttribute('data-md-button')
Expand Down

0 comments on commit 21ff272

Please sign in to comment.