mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-05 04:19:59 -06:00
fix unnecessary scroll to parent when opening new tab
This commit is contained in:
@@ -831,4 +831,11 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
|
||||
noteCreateService.duplicateNote(noteId, branch.parentNoteId);
|
||||
}
|
||||
|
||||
async tabNoteSwitchedEvent({tabContext, notePath}) {
|
||||
// this causes unnecessary scrolling to active note
|
||||
if (tabContext.isActive()) {
|
||||
super.tabNoteSwitchedEvent({tabContext, notePath});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -431,11 +431,13 @@ export default class TabRowWidget extends BasicWidget {
|
||||
removeTab(tabId) {
|
||||
const tabEl = this.getTabById(tabId)[0];
|
||||
|
||||
tabEl.parentNode.removeChild(tabEl);
|
||||
this.cleanUpPreviouslyDraggedTabs();
|
||||
this.layoutTabs();
|
||||
this.setupDraggabilly();
|
||||
this.setVisibility();
|
||||
if (tabEl) {
|
||||
tabEl.parentNode.removeChild(tabEl);
|
||||
this.cleanUpPreviouslyDraggedTabs();
|
||||
this.layoutTabs();
|
||||
this.setupDraggabilly();
|
||||
this.setVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
getTabIdsInOrder() {
|
||||
|
||||
Reference in New Issue
Block a user