Skip to content

Commit

Permalink
Notify when preventing link opening
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 8, 2019
1 parent 472e41e commit 34f7dde
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/AsideList.js
Expand Up @@ -13,6 +13,11 @@ export default class AsideList extends Component {
el.contentEditable = "true";
setTimeout(() => {
el.contentEditable = "false";
if (!this.state.writeMode && el.nodeName === "A") {
import("../notify")
.then(m => m.default)
.then(notify => notify("Use Ctrl+Click to open the link"));
}
}, 300);
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/components/NewsletterArticle.js
Expand Up @@ -71,6 +71,11 @@ export default class NewsletterArticle extends Component {
el.contentEditable = "true";
setTimeout(() => {
el.contentEditable = "false";
if (!this.state.writeMode && el.nodeName === "A") {
import("../notify")
.then(m => m.default)
.then(notify => notify("Use Ctrl+Click to open the link"));
}
}, 300);
}
}
Expand Down

0 comments on commit 34f7dde

Please sign in to comment.