Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fix #2046, fix regression from updating the selection
Browse files Browse the repository at this point in the history
A previous 'fix' to double-clicking the Save button actually suppressed subsequent updates of the selection
  • Loading branch information
ianb committed Dec 13, 2016
1 parent 2d4df88 commit d331fdd
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions addon/lib/shooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ const ShotContext = Class({
let loadingTab;
let doneSuperFast = false;
this.copyUrlToClipboard();
if (this._takeShotTabIsOpening) {
return;
}
this._takeShotTabIsOpening = true;
tabs.open({
url: this.shot.creatingUrl,
onOpen: (tab) => {
Expand Down Expand Up @@ -243,15 +247,8 @@ const ShotContext = Class({
sendEvent("cancel-shot", "tab-reload");
}
this.destroy();
console.log("the interactive worker was detached");
});
let isTakingShot = false;
this.interactiveWorker.port.on("select", watchFunction(function (pos, shotText, captureType) {
if (isTakingShot) {
// Double-click on a save button
return;
}
isTakingShot = true;
// FIXME: there shouldn't be this disconnect between arguments to captureTab
var info = {
x: pos.left,
Expand Down

0 comments on commit d331fdd

Please sign in to comment.