fix mentions

This commit is contained in:
zadam
2023-06-29 12:19:01 +02:00
parent b7c37fdf58
commit 788841d256
7 changed files with 23 additions and 26 deletions

View File

@@ -454,8 +454,8 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
return clickIndex;
}
async loadReferenceLinkTitle($el) {
const {noteId} = linkService.parseNavigationStateFromUrl($el.find("a").attr("href"));
async loadReferenceLinkTitle($el, href) {
const {noteId} = linkService.parseNavigationStateFromUrl(href);
const note = await froca.getNote(noteId, true);
const title = note ? note.title : '[missing]';
@@ -468,7 +468,7 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
}
async renderOwnedAttributes(ownedAttributes, saved) {
// attrs are not resorted if position changes after initial load
// attrs are not resorted if position changes after the initial load
ownedAttributes.sort((a, b) => a.position < b.position ? -1 : 1);
let htmlAttrs = (await attributeRenderer.renderAttributes(ownedAttributes, true)).html();

View File

@@ -101,14 +101,6 @@ export default class AbstractTextTypeWidget extends TypeWidget {
await linkService.loadReferenceLinkTitle($el, href);
}
async getReferenceLinkTitle(href) {
return await linkService.getReferenceLinkTitle(href);
}
getReferenceLinkTitleSync(href) {
return linkService.getReferenceLinkTitleSync(href);
}
refreshIncludedNote($container, noteId) {
if ($container) {
$container.find(`section[data-note-id="${noteId}"]`).each((_, el) => {