From ebe93591e5402c296ebb8481affe16f287186a93 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Wed, 23 Nov 2016 10:43:04 -0800 Subject: [PATCH] Fix mouseup handler in StagingView Previously, clicking in an empty area of the staging view would cause a FilePatch view to open for the current selection. This changes the mouseup handler to only report that the selection changed if there is a drag operation in progress. --- lib/views/staging-view.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/views/staging-view.js b/lib/views/staging-view.js index 875ea9b13d..1e378bf2e9 100644 --- a/lib/views/staging-view.js +++ b/lib/views/staging-view.js @@ -162,9 +162,11 @@ export default class StagingView { } mouseup () { - this.mouseSelectionInProgress = false - this.selection.coalesce() - this.onDidChangeSelectedItem() + if (this.mouseSelectionInProgress) { + this.mouseSelectionInProgress = false + this.selection.coalesce() + this.onDidChangeSelectedItem() + } } render () {