Don't allow opening docks by clicking on the resize handle

This commit is contained in:
Max Brunsfeld
2017-04-04 16:23:46 -07:00
parent c810ac4f5b
commit 8b407bf48f
2 changed files with 1 additions and 12 deletions

View File

@@ -139,8 +139,7 @@ module.exports = class Dock {
this.wrapperElement.classList.add('atom-dock-content-wrapper', this.location)
this.resizeHandle = new DockResizeHandle({
location: this.location,
onResizeStart: this.handleResizeHandleDragStart,
toggle: this.toggle.bind(this)
onResizeStart: this.handleResizeHandleDragStart
})
this.toggleButton = new DockToggleButton({
onDragEnter: this.handleToggleButtonDragEnter.bind(this),
@@ -602,12 +601,10 @@ module.exports = class Dock {
class DockResizeHandle {
constructor (props) {
this.handleMouseDown = this.handleMouseDown.bind(this)
this.handleClick = this.handleClick.bind(this)
this.element = document.createElement('div')
this.element.classList.add('atom-dock-resize-handle', props.location)
this.element.addEventListener('mousedown', this.handleMouseDown)
this.element.addEventListener('click', this.handleClick)
this.props = props
this.update(props)
}
@@ -635,13 +632,6 @@ class DockResizeHandle {
destroy () {
this.element.removeEventListener('mousedown', this.handleMouseDown)
this.element.removeEventListener('click', this.handleClick)
}
handleClick () {
if (!this.props.dockIsOpen) {
this.props.toggle()
}
}
handleMouseDown () {