mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 09:15:50 +01:00
refactoring of legacy js events
This commit is contained in:
@@ -33,7 +33,7 @@ async function initContextMenu(event, contextMenu) {
|
||||
.addClass("dropdown-item")
|
||||
.append($link)
|
||||
.attr("data-cmd", item.cmd)
|
||||
.click(function (e) {
|
||||
.on('click', function (e) {
|
||||
const cmd = $(e.target).closest(".dropdown-item").attr("data-cmd");
|
||||
|
||||
e.originalTarget = event.target;
|
||||
@@ -92,7 +92,7 @@ async function initContextMenu(event, contextMenu) {
|
||||
}).addClass("show");
|
||||
}
|
||||
|
||||
$(document).click(() => hideContextMenu());
|
||||
$(document).on('click', () => hideContextMenu());
|
||||
|
||||
function hideContextMenu() {
|
||||
// this date checking comes from change in FF66 - https://github.com/zadam/trilium/issues/468
|
||||
|
||||
Reference in New Issue
Block a user