From b477a3cb291414827644d5369e236d0cb9b42495 Mon Sep 17 00:00:00 2001 From: Mike Thomson Date: Wed, 14 Mar 2018 15:29:40 -0400 Subject: [PATCH] Updated build file for new build --- lib/index.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/index.js b/lib/index.js index b315ae1..e6f5ec6 100644 --- a/lib/index.js +++ b/lib/index.js @@ -188,17 +188,18 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'addEvents', value: function addEvents(type) { + var iframeDocument = document.getElementById('modal-editor-frame').contentWindow.document; switch (type) { case 'mouse': { - document.addEventListener('mousemove', this.onMouseOrTouchMove); - document.addEventListener('mouseup', this.onInteractionEnd); + iframeDocument.addEventListener('mousemove', this.onMouseOrTouchMove); + iframeDocument.addEventListener('mouseup', this.onInteractionEnd); break; } case 'touch': { - document.addEventListener('touchmove', this.onMouseOrTouchMove); - document.addEventListener('touchend', this.onInteractionEnd); + iframeDocument.addEventListener('touchmove', this.onMouseOrTouchMove); + iframeDocument.addEventListener('touchend', this.onInteractionEnd); break; } default: // nothing @@ -207,10 +208,11 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'removeEvents', value: function removeEvents() { - document.removeEventListener('mousemove', this.onMouseOrTouchMove); - document.removeEventListener('mouseup', this.onInteractionEnd); - document.removeEventListener('touchmove', this.onMouseOrTouchMove); - document.removeEventListener('touchend', this.onInteractionEnd); + var iframeDocument = document.getElementById('modal-editor-frame').contentWindow.document; + iframeDocument.removeEventListener('mousemove', this.onMouseOrTouchMove); + iframeDocument.removeEventListener('mouseup', this.onInteractionEnd); + iframeDocument.removeEventListener('touchmove', this.onMouseOrTouchMove); + iframeDocument.removeEventListener('touchend', this.onInteractionEnd); } }, { key: 'updateSliderValue',