Skip to content

Commit

Permalink
Merge pull request #7323 from meeseeksmachine/auto-backport-of-pr-731…
Browse files Browse the repository at this point in the history
…1-on-1.x

Backport PR #7311 on branch 1.x (Skip custom click behavior on links when the download attribute is set)
  • Loading branch information
jasongrout committed Oct 11, 2019
2 parents a1ffbc1 + 68409a5 commit c46b677
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/rendermime-extension/src/index.ts
Expand Up @@ -80,6 +80,11 @@ function activate(
? null
: {
handleLink: (node: HTMLElement, path: string, id?: string) => {
// If node has the download attribute explicitly set, use the
// default browser downloading behavior.
if (node.tagName === 'A' && node.hasAttribute('download')) {
return;
}
app.commandLinker.connectNode(node, CommandIDs.handleLink, {
path,
id
Expand Down
2 changes: 1 addition & 1 deletion packages/rendermime-interfaces/src/index.ts
Expand Up @@ -320,7 +320,7 @@ export namespace IRenderMime {
/**
* Add the link handler to the node.
*
* @param node: the node for which to handle the link.
* @param node: the anchor node for which to handle the link.
*
* @param path: the path to open when the link is clicked.
*
Expand Down

0 comments on commit c46b677

Please sign in to comment.