Skip to content

Commit

Permalink
Source formatting
Browse files Browse the repository at this point in the history
Fixes #582
  • Loading branch information
ipeychev committed Aug 23, 2016
1 parent 19df393 commit 7b282fc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/plugins/dragresize.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@

var IMAGE_SNAP_TO_SIZE = 7;

var isWebKit = ('WebkitAppearance' in document.documentElement.style);
var isFirefox = ('MozAppearance' in document.documentElement.style);
var isWebKit = ('WebkitAppearance' in document.documentElement.style);

var enablePlugin = isWebKit || isFirefox;

if (isFirefox) {
// Disable default behaviour of editting in designMode
document.execCommand("enableObjectResizing", false, false);
// Disable the native image resizing
document.execCommand('enableObjectResizing', false, false);
}

if (enablePlugin) {
Expand Down Expand Up @@ -114,6 +115,10 @@
if (resizeElement) {
resizeElement.remove();
}

if (isFirefox) {
document.execCommand('enableObjectResizing', false, true);
}
});

// Update the selection when the browser window is resized
Expand Down

0 comments on commit 7b282fc

Please sign in to comment.