preventDefault() and stopPropagation() only if moving
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
7042eb38dd
commit
adcdd72a08
1 changed files with 2 additions and 2 deletions
|
@ -199,11 +199,11 @@ export default class CallPreview extends React.Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private onMoving = (event: React.MouseEvent | MouseEvent) => {
|
private onMoving = (event: React.MouseEvent | MouseEvent) => {
|
||||||
|
if (!this.state.moving) return;
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
if (!this.state.moving) return;
|
|
||||||
|
|
||||||
this.lastX = event.pageX - this.initX;
|
this.lastX = event.pageX - this.initX;
|
||||||
this.lastY = event.pageY - this.initY;
|
this.lastY = event.pageY - this.initY;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue