mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
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:
11
src/dock.js
11
src/dock.js
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user