mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
Destroy underlying element when resetting or destroying Workspace
This commit is contained in:
@@ -132,6 +132,10 @@ class WorkspaceElement extends HTMLElement {
|
||||
return this
|
||||
}
|
||||
|
||||
destroy () {
|
||||
this.subscriptions.dispose()
|
||||
}
|
||||
|
||||
getModel () { return this.model }
|
||||
|
||||
handleDragStart (event) {
|
||||
|
||||
@@ -310,7 +310,10 @@ module.exports = class Workspace extends Model {
|
||||
this.originalFontSize = null
|
||||
this.openers = []
|
||||
this.destroyedItemURIs = []
|
||||
this.element = null
|
||||
if (this.element) {
|
||||
this.element.destroy()
|
||||
this.element = null
|
||||
}
|
||||
this.consumeServices(this.packageManager)
|
||||
}
|
||||
|
||||
@@ -1570,6 +1573,7 @@ module.exports = class Workspace extends Model {
|
||||
if (this.activeItemSubscriptions != null) {
|
||||
this.activeItemSubscriptions.dispose()
|
||||
}
|
||||
if (this.element) this.element.destroy()
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user