Merge pull request #19206 from atom/focus-on-activate

Set the panel flag as focused when activate() is called
This commit is contained in:
Rafael Oleza
2019-04-25 18:03:27 +02:00
committed by GitHub

View File

@@ -393,7 +393,6 @@ class Pane {
// Called by the view layer to indicate that the pane has gained focus.
focus () {
this.focused = true
return this.activate()
}
@@ -1011,6 +1010,8 @@ class Pane {
// Public: Makes this pane the *active* pane, causing it to gain focus.
activate () {
if (this.isDestroyed()) throw new Error('Pane has been destroyed')
this.focused = true
if (this.container) this.container.didActivatePane(this)
this.emitter.emit('did-activate')
}