mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
note launchers by default open in the active note context but follow the same logic with ctrl/middle click as links
This commit is contained in:
@@ -13,10 +13,23 @@ export default class OnClickButtonWidget extends AbstractButtonWidget {
|
||||
} else {
|
||||
console.warn(`Button widget '${this.componentId}' has no defined click handler`, this.settings);
|
||||
}
|
||||
|
||||
if (this.settings.onAuxClick) {
|
||||
this.$widget.on("auxclick", e => {
|
||||
this.$widget.tooltip("hide");
|
||||
|
||||
this.settings.onAuxClick(this, e);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onClick(handler) {
|
||||
this.settings.onClick = handler;
|
||||
return this;
|
||||
}
|
||||
|
||||
onAuxClick(handler) {
|
||||
this.settings.onAuxClick = handler;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user