Skip to content

Commit fe5ae6e

Browse files
committed
fix clicking on inner elements in button
1 parent 2733d07 commit fe5ae6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ function applyFromToolbar(event: Event) {
313313
if (!(target instanceof Element)) return
314314
const mdButton = target.closest('[data-md-button]')
315315
if (!mdButton || mdButton.closest('markdown-toolbar') !== currentTarget) return
316-
const mdButtonStyle = target.getAttribute('data-md-button')
316+
const mdButtonStyle = mdButton.getAttribute('data-md-button')
317317
const style = manualStyles[mdButtonStyle as keyof typeof manualStyles]
318318
if (!style) return
319319
event.preventDefault()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy