Skip to content

Commit

Permalink
fix(FEC-8924): [V3][iOS] when touch and dragging from player area the…
Browse files Browse the repository at this point in the history
… page is not scrolling (#372)

Move the prevent default from `touchstart` to `touchend` to enable scrolling on player
  • Loading branch information
Yuvalke committed Apr 7, 2019
1 parent 6bb78e5 commit a066d79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/overlay-action/overlay-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ class OverlayAction extends BaseComponent {
* @memberof OverlayAction
*/
onOverlayPointerDown(event: any): void {
event.preventDefault();
this._pointerDownPosX = event.clientX || event.changedTouches[0].clientX;
this._pointerDownPosY = event.clientY || event.changedTouches[0].clientY;
}
Expand All @@ -139,7 +138,7 @@ class OverlayAction extends BaseComponent {
*/
onOverlayMouseUp(event: any): void {
if (!this.isDragging(event)) {
this.onOverlayClick();
this.overlayClick();
}
}

Expand All @@ -151,6 +150,7 @@ class OverlayAction extends BaseComponent {
* @memberof OverlayAction
*/
onOverlayTouchEnd(event: any): void {
event.preventDefault();
if (this.props.playerHover && !this.isDragging(event)) {
this.togglePlayPause();
}
Expand All @@ -173,12 +173,12 @@ class OverlayAction extends BaseComponent {
}

/**
* Handler for overlay click
* click action
*
* @returns {void}
* @memberof OverlayAction
*/
onOverlayClick(): void {
overlayClick(): void {
const now = Date.now();
if (now - this._firstClickTime < PLAY_PAUSE_BUFFER_TIME) {
this.cancelClickTimeout();
Expand Down

0 comments on commit a066d79

Please sign in to comment.