From 189f81b0c5b887b509c329cca483c646826ee92d Mon Sep 17 00:00:00 2001 From: Ruben Almeida Date: Thu, 18 Aug 2016 17:23:51 +0200 Subject: [PATCH] mouseup event not fire on IE8- See isuue #6 --- colorPicker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/colorPicker.js b/colorPicker.js index 845f43e..3741cb1 100644 --- a/colorPicker.js +++ b/colorPicker.js @@ -445,6 +445,9 @@ function installEventListeners(THIS, off) { var onOffEvent = off ? removeEvent : addEvent; + onOffEvent(_isIE ? document.body : window, 'mouseup', stopChange); + onOffEvent(_isIE ? document.body : window, 'touchend', stopChange); + function touchStart_MouseDown(e) { var event = e || window.event, page = getPageXY(event), @@ -539,9 +542,6 @@ }); } - addEvent(_isIE ? document.body : window, 'mouseup', stopChange); - addEvent(_isIE ? document.body : window, 'touchend', stopChange); - // ------------------------------------------------------ // // --------- Event listner's callback functions -------- // // -------------------------------------------------------//