mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 14:55:50 +01:00
don't try to activate the pane being currently removed
This commit is contained in:
@@ -13,6 +13,12 @@ export default class ClosePaneButton extends ButtonWidget {
|
||||
this.icon("bx-x")
|
||||
.title("Close this pane")
|
||||
.titlePlacement("bottom")
|
||||
.onClick(widget => widget.triggerCommand("closeThisNoteSplit", { ntxId: widget.getNtxId() }));
|
||||
.onClick((widget, e) => {
|
||||
// to avoid split pane container detecting click within the pane which would try to activate this
|
||||
// pane (which is being removed)
|
||||
e.stopPropagation();
|
||||
|
||||
widget.triggerCommand("closeThisNoteSplit", { ntxId: widget.getNtxId() });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user