Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Disable the default handling of the pinch event when handling it. #3334

Merged
merged 2 commits into from
Aug 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/timeline/Range.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,8 @@ Range.prototype._onTouch = function (event) {
this.props.touch.center = null;
this.scaleOffset = 0;
this.deltaDifference = 0;
// Disable the browser default handling of this event.
util.preventDefault(event);
};

/**
Expand All @@ -682,6 +684,9 @@ Range.prototype._onPinch = function (event) {
// only allow zooming when configured as zoomable and moveable
if (!(this.options.zoomable && this.options.moveable)) return;

// Disable the browser default handling of this event.
util.preventDefault(event);

this.props.touch.allowDragging = false;

if (!this.props.touch.center) {
Expand Down