ctrl+alt+p will create new note in a new tab

This commit is contained in:
zadam
2019-05-19 10:46:19 +02:00
parent f3e7e6bbe7
commit 597eb5a300
3 changed files with 9 additions and 3 deletions

View File

@@ -335,11 +335,13 @@ $tabContentsContainer.on("drop", e => {
});
});
async function openEmptyTab() {
async function openEmptyTab(render = true) {
const ctx = new TabContext(tabRow);
tabContexts.push(ctx);
await renderComponent(ctx);
if (render) {
await renderComponent(ctx);
}
await tabRow.activateTab(ctx.$tab[0]);
}
@@ -493,5 +495,6 @@ export default {
isActive,
activateTabContext,
clearOpenTabsTask,
filterTabs
filterTabs,
openEmptyTab
};