addRippleDeactivateEventListener(isTouch, rippleKey) {
        const eventType = isTouch ? 'touchend' : 'mouseup';
        const endRipple = this.createRippleDeactivateCallback(eventType, rippleKey);
        document.addEventListener(eventType, endRipple);
        return endRipple;
      }
Add an event listener to the document needed to deactivate a ripple and make it dissappear.
Deactivation can happen with a touchend or mouseup depending on the trigger type. The
ending function is created from a factory function and returned.

@param {Boolean} isTouch True in case the trigger was a touch event false otherwise.
@param {String} rippleKey It's a key to identify the ripple that should be deactivated.
@return {Function} Callback function that deactivates the ripple and removes the listener