Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43d25fe

Browse files
author
Michelle Tilley
authored
Merge pull request atom#779 from atom/mkt-ensure-dock-open-on-first-run
Ensure that activating a DockItem shows the corresponding Dock
2 parents 066344e + e682708 commit 43d25fe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/views/dock-item.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ export default class DockItem extends React.Component {
124124
const pane = this.props.workspace.paneForItem(this.dockItem);
125125
if (pane) {
126126
pane.activateItem(this.dockItem);
127+
const dock = this.props.workspace.getPaneContainers()
128+
.find(container => container.getPanes().find(p => p.getItems().includes(this.dockItem)));
129+
if (dock && dock.show) {
130+
dock.show();
131+
}
127132
} else {
128133
throw new Error('Cannot find pane for item in `DockItem#activate`');
129134
}

0 commit comments

Comments
 (0)