mirror of
https://github.com/atom/atom.git
synced 2026-02-08 13:45:09 -05:00
Don't allow opening docks by clicking on the resize handle
This commit is contained in:
12
src/dock.js
12
src/dock.js
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user