Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #11935 from dmarcos/master
Browse files Browse the repository at this point in the history
Bug 894826 - [Buri][Gallery] Multiple taps on image edit ok button...
  • Loading branch information
dmarcos committed Sep 5, 2013
2 parents 4df267f + e9ef427 commit 0cf6bd0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/gallery/js/ImageEditor.js
Expand Up @@ -279,6 +279,9 @@ function undoCropHandler() {
}

function exitEditMode(saved) {
// Enables the save button once the edited image has been saved
$('edit-save-button').disabled = false;

// Revoke the blob URL we've been using
URL.revokeObjectURL(editedPhotoURL);
editedPhotoURL = null;
Expand Down Expand Up @@ -317,6 +320,10 @@ function exitEditMode(saved) {
// change event when we manually add something to it or at least have that
// option
function saveEditedImage() {
// Save button disabled to prevent the user triggering multiple
// save operations
$('edit-save-button').disabled = true;

// If we are in crop mode, perform the crop before saving
if ($('edit-crop-button').classList.contains('selected'))
imageEditor.cropImage();
Expand Down

0 comments on commit 0cf6bd0

Please sign in to comment.