From 8b407bf48fa4558ef1f9500454cdc97af2534035 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 4 Apr 2017 16:23:46 -0700 Subject: [PATCH] Don't allow opening docks by clicking on the resize handle --- src/dock.js | 12 +----------- static/docks.less | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/dock.js b/src/dock.js index 550525795..590c12c5b 100644 --- a/src/dock.js +++ b/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 () { diff --git a/static/docks.less b/static/docks.less index 583409726..320ac4c4a 100644 --- a/static/docks.less +++ b/static/docks.less @@ -178,7 +178,6 @@ atom-dock { width: auto; height: auto; flex: 0 0 auto; - cursor: pointer; // Use the resize cursor when the handle's resizable &.atom-dock-resize-handle-resizable {