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

Commit

Permalink
cancel default action on click events
Browse files Browse the repository at this point in the history
  • Loading branch information
Niharika Khanna committed Jan 23, 2018
1 parent 1291430 commit 354f155
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/src/pages/shot/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ exports.Editor = class Editor extends React.Component {
}

mouseup(e) {
e.preventDefault();
if (!selectedPos.width || !selectedPos.height) {
this.removeCropBox();
}
Expand All @@ -219,6 +220,7 @@ exports.Editor = class Editor extends React.Component {
}

mousedown(e) {
e.preventDefault();
mousedown = true;
let rect = this.cropContainer.getBoundingClientRect();
if (!this.cropBox) {
Expand All @@ -239,6 +241,7 @@ exports.Editor = class Editor extends React.Component {
}

mousemove(e) {
e.preventDefault();
let rect = this.cropContainer.getBoundingClientRect();
if (mousedown && selectionState == "creating") {
selectedPos = new Selection(
Expand Down

0 comments on commit 354f155

Please # to comment.