Skip to content

Commit

Permalink
Merge pull request #80 from github/fix-clicking-on-inner-elements-in-…
Browse files Browse the repository at this point in the history
…button

fix clicking on inner elements in button
  • Loading branch information
keithamus authored Mar 1, 2024
2 parents 21ff272 + fe5ae6e commit 9e1f966
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 @@ -313,7 +313,7 @@ function applyFromToolbar(event: Event) {
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')
const mdButtonStyle = mdButton.getAttribute('data-md-button')
const style = manualStyles[mdButtonStyle as keyof typeof manualStyles]
if (!style) return
event.preventDefault()
Expand Down

0 comments on commit 9e1f966

Please sign in to comment.