mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge pull request #14339 from atom/mb-dont-change-focus-when-hiding-unfocused-dock
Don't change focus when hiding an unfocused dock
This commit is contained in:
@@ -151,7 +151,7 @@ module.exports = class Dock {
|
||||
|
||||
this.state = nextState
|
||||
this.render(this.state)
|
||||
if (didHide) this.didHide()
|
||||
if (didHide) this.didHide(this)
|
||||
}
|
||||
|
||||
render (state) {
|
||||
|
||||
@@ -470,8 +470,12 @@ module.exports = class Workspace extends Model {
|
||||
}
|
||||
}
|
||||
|
||||
didHideDock () {
|
||||
this.getCenter().activate()
|
||||
didHideDock (dock) {
|
||||
const {activeElement} = document
|
||||
const dockElement = dock.getElement()
|
||||
if (dockElement === activeElement || dockElement.contains(activeElement)) {
|
||||
this.getCenter().activate()
|
||||
}
|
||||
}
|
||||
|
||||
setDraggingItem (draggingItem) {
|
||||
|
||||
Reference in New Issue
Block a user