Prevent closing tab when closable is set to false
This commit is contained in:
parent
fd69f6bbe5
commit
4b2a2476ea
1 changed files with 2 additions and 1 deletions
3
index.js
3
index.js
|
@ -189,7 +189,8 @@ class Tab {
|
||||||
// TODO: move
|
// TODO: move
|
||||||
}
|
}
|
||||||
|
|
||||||
close () {
|
close (force) {
|
||||||
|
if (!this.closable && !force) return;
|
||||||
let tabGroup = this.tabGroup;
|
let tabGroup = this.tabGroup;
|
||||||
tabGroup.tabContainer.removeChild(this.tab);
|
tabGroup.tabContainer.removeChild(this.tab);
|
||||||
tabGroup.viewContainer.removeChild(this.webview);
|
tabGroup.viewContainer.removeChild(this.webview);
|
||||||
|
|
Loading…
Reference in a new issue