Skip to content

Commit

Permalink
Correctly detect the Edit button
Browse files Browse the repository at this point in the history
  • Loading branch information
hieutbui committed Jan 14, 2024
1 parent acaeac2 commit cc7fc46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/widgets/html_editor_widget_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ class _HtmlEditorWidgetWebState extends State<HtmlEditorWidget> {
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;
Expand Down

0 comments on commit cc7fc46

Please sign in to comment.