Skip to content

Commit

Permalink
fix: #584 core.insertNode
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 committed Jan 22, 2021
1 parent d050375 commit 901bc69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1615,8 +1615,8 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
afterNode = null;
}
} else {
parentNode = isFormats ? commonCon : container;
afterNode = isFormats ? endCon : null;
parentNode = isFormats ? commonCon : util.isFormatElement(container) ? container : container.parentNode;
afterNode = isFormats ? endCon : util.isFormatElement(container) ? null : container;
}

while (afterNode && !util.isFormatElement(afterNode) && afterNode.parentNode !== commonCon) {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/dialog/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ export default {
}

if (!/^\#/.test(url) && downloadEl.checked) {
anchor.removeAttribute('download');
} else {
anchor.setAttribute('download', alt || url);
} else {
anchor.removeAttribute('download');
}

anchor.href = url;
Expand Down

0 comments on commit 901bc69

Please sign in to comment.