use sender in show bookmark bitty
This commit is contained in:
@@ -2,12 +2,12 @@ const bookmarkMenuHrefTemplate = '/hyperapi/bookmarks-dropdown'
|
|||||||
|
|
||||||
export default class {
|
export default class {
|
||||||
async showBookmarkMenu(ev, el) {
|
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({
|
const searchParams = new URLSearchParams({
|
||||||
'id': ev.target.dataset.conceptId,
|
'id': ev.sender.dataset.conceptId,
|
||||||
'require_reload': el.dataset.requireReload,
|
'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);
|
const res = await this.api.getHTML(bookmarkMenuHref);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user