mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Merge pull request #19206 from atom/focus-on-activate
Set the panel flag as focused when activate() is called
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user