fix "isActive()" detection to work well with splits, #2806

This commit is contained in:
zadam 2022-04-23 23:06:42 +02:00
parent 569c80f551
commit 11578b1bc3

View File

@ -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() {}