fix attribute name autocomplete, no tooltip preview on path selection

This commit is contained in:
azivner
2018-08-15 18:22:02 +02:00
parent 4513651e12
commit dbe0eb3f3a
4 changed files with 27 additions and 14 deletions

View File

@@ -6,10 +6,16 @@ function setupTooltip() {
$(document).tooltip({
items: "body a",
content: function (callback) {
let notePath = linkService.getNotePathFromLink($(this).attr("href"));
const $link = $(this);
if ($link.hasClass("no-tooltip-preview")) {
return;
}
let notePath = linkService.getNotePathFromLink($link.attr("href"));
if (!notePath) {
notePath = $(this).attr("data-note-path");
notePath = $link.attr("data-note-path");
}
if (notePath) {