Merge pull request #16936 from atom/fb-mdt-fix-16933

Fix bug caused by dragging file from desktop through dock handle
This commit is contained in:
David Wilson
2018-03-30 15:31:55 -07:00
committed by GitHub

View File

@@ -233,7 +233,7 @@ module.exports = class Dock {
),
$(DockToggleButton, {
ref: 'toggleButton',
onDragEnter: this.handleToggleButtonDragEnter,
onDragEnter: this.state.draggingItem ? this.handleToggleButtonDragEnter : null,
location: this.location,
toggle: this.toggle,
dockIsVisible: shouldBeVisible,
@@ -779,7 +779,10 @@ class DockToggleButton {
{
ref: 'innerElement',
className: `atom-dock-toggle-button-inner ${this.props.location}`,
on: {click: this.handleClick, dragenter: this.handleDragEnter}
on: {
click: this.handleClick,
dragenter: this.props.onDragEnter
}
},
$.span({
ref: 'iconElement',
@@ -808,10 +811,6 @@ class DockToggleButton {
handleClick () {
this.props.toggle()
}
handleDragEnter () {
this.props.onDragEnter()
}
}
// An etch component that doesn't use etch, this component provides a gateway from JSX back into