From 0e9988daf439b49eb2b6a6c2ecf194bb0c1dfb58 Mon Sep 17 00:00:00 2001 From: hieubt Date: Mon, 15 Jan 2024 00:58:44 +0700 Subject: [PATCH] Correctly detect the Edit button --- lib/src/widgets/html_editor_widget_web.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/widgets/html_editor_widget_web.dart b/lib/src/widgets/html_editor_widget_web.dart index 27c90b74..35add3f3 100644 --- a/lib/src/widgets/html_editor_widget_web.dart +++ b/lib/src/widgets/html_editor_widget_web.dart @@ -829,7 +829,7 @@ class _HtmlEditorWidgetWebState extends State { callbacks = """$callbacks \$('#summernote-2').on('summernote.mouseup', function(_, context) { \$('.note-link-popover').off('click').on('click', function(e) { - if (e.target.className == 'note-icon-link' || e.target.className == 'note-btn') { + if (e.target.className == 'note-icon-link' || (e.target.className == 'note-btn' && e.target.getAttribute('aria-label') == 'Edit')) { var linkTag = context.target; const linkTagId = 'id_' + new Date().getTime(); linkTag.id = linkTagId;