From 7ac71a673cd69ecfa24a30c478a72a9e3609580c Mon Sep 17 00:00:00 2001 From: Alex Chuev Date: Thu, 29 Jun 2017 16:02:04 +0300 Subject: [PATCH] Updated drag and drop example It's better to subscribe on document's mouseup event, but not on the target's one. --- examples/dragndrop/dragndrop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/dragndrop/dragndrop.js b/examples/dragndrop/dragndrop.js index bb8bed1a8..d3dab16e6 100644 --- a/examples/dragndrop/dragndrop.js +++ b/examples/dragndrop/dragndrop.js @@ -4,8 +4,8 @@ var dragTarget = document.getElementById('dragTarget'); // Get the three major events - var mouseup = Rx.Observable.fromEvent(dragTarget, 'mouseup'); - var mousemove = Rx.Observable.fromEvent(document, 'mousemove'); + var mouseup = Rx.Observable.fromEvent(document, 'mouseup'); + var mousemove = Rx.Observable.fromEvent(document, 'mousemove'); var mousedown = Rx.Observable.fromEvent(dragTarget, 'mousedown'); var mousedrag = mousedown.flatMap(function (md) {