use sender in show bookmark bitty

This commit is contained in:
2025-11-27 03:03:21 +03:00
parent 90fe38497d
commit d0c82cf9a9

View File

@@ -2,12 +2,12 @@ const bookmarkMenuHrefTemplate = '/hyperapi/bookmarks-dropdown'
export default class {
async showBookmarkMenu(ev, el) {
if ((ev.target.dataset.bookmarkId === el.getString('bookmarkId')) && el.childElementCount === 0) {
if ((ev.sender.dataset.bookmarkId === el.getString('bookmarkId')) && el.childElementCount === 0) {
const searchParams = new URLSearchParams({
'id': ev.target.dataset.conceptId,
'id': ev.sender.dataset.conceptId,
'require_reload': el.dataset.requireReload,
});
const bookmarkMenuHref = `${bookmarkMenuHrefTemplate}/${ev.target.dataset.bookmarkType}?${searchParams}`;
const bookmarkMenuHref = `${bookmarkMenuHrefTemplate}/${ev.sender.dataset.bookmarkType}?${searchParams}`;
const res = await this.api.getHTML(bookmarkMenuHref);
if (res.error) {
return;