mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix "isActive()" detection to work well with splits, #2806
This commit is contained in:
parent
569c80f551
commit
11578b1bc3
@ -1,4 +1,5 @@
|
|||||||
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
import NoteContextAwareWidget from "../note_context_aware_widget.js";
|
||||||
|
import appContext from "../../services/app_context.js";
|
||||||
|
|
||||||
export default class TypeWidget extends NoteContextAwareWidget {
|
export default class TypeWidget extends NoteContextAwareWidget {
|
||||||
// for overriding
|
// for overriding
|
||||||
@ -34,7 +35,7 @@ export default class TypeWidget extends NoteContextAwareWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isActive() {
|
isActive() {
|
||||||
return this.$widget.is(":visible");
|
return this.$widget.is(":visible") && this.noteContext?.ntxId === appContext.tabManager.activeNtxId;
|
||||||
}
|
}
|
||||||
|
|
||||||
getContent() {}
|
getContent() {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user