From fe5ae6ef08156e62c10f3499bcd3951607cac952 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 1 Mar 2024 17:41:34 +0000 Subject: [PATCH] fix clicking on inner elements in button --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index a6a502d..9c76c20 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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() 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